fork download
  1. with open(os.path.join(my_path, "scores.csv"), "r") as my_file:
  2. my_file_reader = csv.reader(my_file)
  3. a = {}
  4. for name, score in my_file_reader:
  5. try:
  6. if a[name] < score:
  7. a[name] = score
  8. print(a)
  9. except:
  10. a[name] = score
  11.  
  12.  
Runtime error #stdin #stdout #stderr 0.02s 28352KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "./prog.py", line 1, in <module>
NameError: name 'os' is not defined