jabela

Number Detector

Feb 2nd, 2018
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.35 KB | None | 0 0
  1. def include_numbers(string):
  2.     print(string) #For debugging can remove
  3.     for i in string:
  4.         print(i) #For debugging can remove
  5.         if i in ["0","1","2","3","4","5","6","7","8","9"]:
  6.             print("Includes a number")
  7.             return True
  8.  
  9. test = include_numbers("hello123") #You can include any variable you want here
  10. print(test)
Add Comment
Please, Sign In to add comment