1、
>>> a = {"a":111,"b":222,"c":333,"d":444} >>> a {'a': 111, 'b': 222, 'c': 333, 'd': 444} >>> len(a) 4 >>> type(a) <class 'dict'>
2、
>>> a = dict((("a",111),("b",222),("c",333),("d",444))) >>> a {'a': 111, 'b': 222, 'c': 333, 'd': 444} >>> len(a) 4 >>> type(a) <class 'dict'>
3、
>>> a = dict(a = 111, b = 222, c = 333, d = 444) >>> a {'a': 111, 'b': 222, 'c': 333, 'd': 444} >>> len(a) 4 >>> type(a) <class 'dict'>
4、
>>> a = {} >>> a["a"] = 111 >>> a["b"] = 222 >>> a {'a': 111, 'b': 222} >>> len(a) 2 >>> type(a) <class 'dict'>