Jul-19-2020, 03:23 AM
print("{'1','2','3'} type is {}".format(type({'1', '2', '3'})))
This line throws KeyError.
File "c:/ex2_type.py", line 12, in main
print("\{'1','2','3'\} type is {}".format(type({'1', '2', '3'})))
KeyError: "'1','2','3'\\"
I want to use the format command to print the desired output. What needs to be changed?
This line throws KeyError.
File "c:/ex2_type.py", line 12, in main
print("\{'1','2','3'\} type is {}".format(type({'1', '2', '3'})))
KeyError: "'1','2','3'\\"
I want to use the format command to print the desired output. What needs to be changed?