Jan-27-2020, 01:33 AM
what is stopping me is not knowing what to code to evaluate the pattern (read it from a file).
from foo import * from bar import * with open('pattern_file.txt') as f: for data in f: pattern = data.rstrip() out_str = fy(pattern) print(out_str)what change to the assignment to variable "out_str" in line 8 will have it evaluate then pattern (you cannot change what the pattern contents is expected to do but you can change its value to achieve that goal). you do not get to see the string in advance. it is a valid f-string. the solution must not be specific to any variable names.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.