0

Are there any functions that check wether a variable is an integer or not?

a = ”hello” b = a.isalpha() print(b) The output will be True I need a function similar to isalpha() to check wether the variable is an integer or not.

27th Feb 2022, 6:24 AM
Lenoname
1 Answer
0
Jay Matthews I mean for a variable with an actual integer not numbers within a string. a = 200 b = a.something() print(b) Output: True
27th Feb 2022, 7:16 AM
Lenoname