Trying to help a friend. I am getting an error on the following program. global golf{} name = "" while name != 1: name = input("Golfer's name? ") score = input("Golfer's score? ") golf[name]=score file = open("","w") for key in golf: file.write(key, gofl[key]) file.close() golf is supposed to be a dictionary, but I am getting an error on the first line. Any ideas?