You can use type () function to print the data type of a variable.
Example:
score = 95
type(score)
output:
int
You can use .dtypes to print the data types of all the columns of a dataframe.
Example:
#to find datatypes of all columns
df.dtypes
If you wish to learn Python from an online course, then enroll in this Python Course by Intellipaat provides instructor-led training, lifetime access, certification, and job assistance.