to check variable type in python just Use isinstance().By using isinstance() you can check the variable type. Here you have to pass two thing variable and second is variable type. Then you can check the type you entered is true or false. lets see this by example: Var1 = 50 print("My var is int : ",isinstance(Var1, int)) print("My var is int: ",isinstance("My String", int)) Output : My var is int : True My var is int: False