fork(2) download
  1. import re
  2.  
  3.  
  4. sashalist = ['Sasha1', 'Sasha14', 'Sasha4147']
  5. sasharegex = r'\d'
  6.  
  7. if all(re.search(sasharegex, sashalist) in item for item in sashalist):
  8. print('Все элементы списка содержат цифру!')
Runtime error #stdin #stdout #stderr 0.04s 9352KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "./prog.py", line 7, in <module>
  File "./prog.py", line 7, in <genexpr>
  File "/usr/lib/python3.5/re.py", line 173, in search
    return _compile(pattern, flags).search(string)
TypeError: expected string or bytes-like object