fork download
  1. person = {'first_name': 'Jane', 'last_name': 'Doe'}
  2. new_dictionary = {}
  3. for k, v in person.items():
  4. new_dictionary.k = v
Runtime error #stdin #stdout #stderr 0.02s 27664KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "./prog.py", line 4, in <module>
AttributeError: 'dict' object has no attribute 'k'