Print all keys of a dictionary using f-string

后端 未结 0 1387
既然无缘
既然无缘 2021-02-09 19:48

I try to print all keys of a dictionary using f-string.

My current solution is

data = {\'key1\': 1, \'key2\': 2, \'key3\': 3}
print{f\'All keys are {"         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题