SyntaxFix
Write A Post
Hire A Developer
Questions
lines is a list of strings, re.findall doesn't work with that. try:
lines
re.findall
import re, sys f = open('findallEX.txt', 'r') lines = f.read() match = re.findall('[A-Z]+', lines) print match