I would like to find whether the string contains a certain character(s). if it does then output into a file, if it doesn't then output into another file. My input data looks like this:
exchange security volume
TO AAA 193099
TO AAB 81000
TO AAH 2310
TO AAV 1161144
TO AAVdbh 675000
TO ABC 98050
So far I have tried this:
for row in data:
if 'a' in row['security'] then .....
However, I would like to use regex to match the string i.e. if string contains any lower character then ignore. Thank you so much!
if re.search(r"[a-z]", row['security']):.isupper()...