Advertisement
Guest User

Untitled

a guest
Feb 18th, 2020
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. input = input("Enter your word or phrase:")
  2. string = 0
  3.  
  4. print(input)
  5. if (input.isdigit() == True):
  6. print("All numbers.")
  7. elif (input.isdigit() == False):
  8. for i in range(10):
  9. if (input.find(str(i)) != -1): #if it doesn't return negative, there is a number
  10. print("Contains a " + str(i))
  11. string = 1
  12. if (string != 1):
  13. print("Does not contain numbers.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement