Creating a new dictionary in Python

后端 未结 7 1984
难免孤独
难免孤独 2020-11-29 15:17

I want to build a dictionary in Python. However, all the examples that I see are instantiating a dictionary from a list, etc . ..

How do I create a new empty diction

相关标签:
7条回答
  • 2020-11-29 15:46
    >>> dict(a=2,b=4)
    {'a': 2, 'b': 4}
    

    Will add the value in the python dictionary.

    0 讨论(0)
提交回复
热议问题