Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import re
- input_list = ["somestring1", "somestring", "someotherstring"]
- any([x for x in input_list if re.search("[0-9]", x)])
- l = ['bob', 'fish', 'abc123']
- l = ['bob', 'fish', 'abc']
- not any(any(c.isdigit() for c in s) for s in l)
Add Comment
Please, Sign In to add comment