+ 1
How to differentiate int, float, char type variables in python?
5 Answers
+ 3
Yes, you can change a variableâs type on-the-run. You can also check its type with type().
+ 1
that means I have taken a string variable later on if I want I can assign integer value to it, right??
0
in python you dont need to declare the type for variables
eg.
this is a string variable: me = 'me'
this is an int variable: me = 12345
this is a Boolean variable: me = True
0
Python does it automatically, but for some applications you might want to ''hard '' define them using: str - string, int - integer etc.