0
Detect type of input
How to detect type of input like str or int in python? To tell if it True or False
2 Answers
+ 2
input always returns a string
+ 1
you can use type(var) to get its type, then chect the result if it's int or str
How to detect type of input like str or int in python? To tell if it True or False