fork download
  1. import re
  2. s = 'ACAABAACAAABACDBADDDFSDDDFFSSSASDAFAAACBAAAFASD'
  3. pattern = r'[B-Z](?=AAA)'
  4.  
  5. for item in re.finditer(pattern, s):
  6. result.append(item.group())
  7.  
  8. print(result)
Runtime error #stdin #stdout #stderr 0.12s 23544KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "./prog.py", line 6, in <module>
NameError: name 'result' is not defined