Datatypes are used to hold different types of values. Python supports the following five standard datatypes.
Python automatically determines the data type based on the value assigned to it. You can find the datatype of a variable using type() function.
Example
a=10;
print(type(a)) #int datatype
a='John'
print(type(a)) #string datatypeOutput
<class 'int'>
<class 'str'>
Subscribe
Join the newsletter to get the latest updates.