code snippet:
def after_equals(s):
return s.partition(' = ')[-1]
for k,s in zip(keyword, score):
print after_equals(k) + ',' + after_equals(s)
The output of the code prints:
NORTH,88466
GUESS,83965
DRESSES,79379
RALPH,74897
MATERIAL,68168
I need to output the into file. Please advice how to write to a file.
Open a file in write mode and write a string to the file, then close it:
For your case: