Guest User

Untitled

a guest
Feb 25th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. import re
  2. input_list = ["somestring1", "somestring", "someotherstring"]
  3. any([x for x in input_list if re.search("[0-9]", x)])
  4.  
  5. l = ['bob', 'fish', 'abc123']
  6.  
  7. l = ['bob', 'fish', 'abc']
  8.  
  9. not any(any(c.isdigit() for c in s) for s in l)
Add Comment
Please, Sign In to add comment