Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import csv
- name = '__tu_meno_suboru__.csv'
- with open(name, newline='') as f:
- my_csv = [row for row in csv.reader(f)]
- my_word_set = set(row[1] for row in my_csv)
- my_dict = {word: input('Zadaj preklad pre "%s": ' % word) for word in my_word_set}
- with open(name, 'w', newline='') as f:
- csv_writer = csv.writer(f)
- for row in my_csv:
- csv_writer.writerow(([row[0], row[1], my_dict[row[1]]] for row in my_csv))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement