0

How do I get it to be detected as an "int" value when the value I get from the "input" output is a number?

Loademon
  • 3
  • 1
  • Use `str.isdigit()` to test if a string looks like a number. – Barmar Aug 17 '21 at 16:24
  • ```x=input("Enter a number: ")```,```if x.isdigit(): print("Digit")```,```else: print("Not a number")``` –  Aug 17 '21 at 16:26

0 Answers0