I don't see problem with the indentation. Could you post full traceback that you get, enclosed in error tags?
Also, check how you can iterate efficiently over key, values and items of a dict using keys(), values() and items() methods
https://docs.python.org/3/tutorial/datas...ctionaries
However, if you want to print all values, separated by comma, you can use str.join() method
Also, check how you can iterate efficiently over key, values and items of a dict using keys(), values() and items() methods
https://docs.python.org/3/tutorial/datas...ctionaries
However, if you want to print all values, separated by comma, you can use str.join() method
>>> d={1:'one', 2:'two'} >>> ','.join(d.values()) 'one,two' >>>Note that dict is unordered and you cannot be certain of the order in which each dict will be printed - both in your implementation and when using join. That is certain for versions up to python3.5. In CPython 3.6+ dict preserve the order of insertion, but this is still considered an implementation detail and one should not relied upon. https://docs.python.org/3.6/whatsnew/3.6...ementation