Python has many types of variables. Some key ones are-
- Integer (Whole number)
- Float (Decimal points)
- String (Categorical)
- Date time
It’s easy to convert one type of variable into another type, whenever possible. It’s called “Typecasting”. Moreover, we don’t have to specify the type specifically in Python.
Python assigns the right type depending on the value we assign. Here are some examples-