Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- input = input("Enter your word or phrase:")
- string = 0
- print(input)
- if (input.isdigit() == True):
- print("All numbers.")
- elif (input.isdigit() == False):
- for i in range(10):
- if (input.find(str(i)) != -1): #if it doesn't return negative, there is a number
- print("Contains a " + str(i))
- string = 1
- if (string != 1):
- print("Does not contain numbers.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement