How do I create an if statement to check if my variable is an int?

Published: 9/10/2019
How do I create an if statement to check if my variable is an int?
Source: STACKOVERFLOW.COM

I want to make a program but I need to check the input of the user so, the question is How do I check the input value, if it`s a string or an integer? here s some experimental code that didn t work but I`ve tried a= 10 print(type(a)) if (a==10): print("aaaaa") else: if(type(a)== "<class 'int'>"): print("12345")

Read more
Related news
Comment
FACEBOOK