使用 dict()构造函数创建字典

  1. thisdict = dict(brand="Porsche", model="911", year=1963)
  2. # note that keywords are not string literals
  3. # note the use of equals rather than colon for the assignment
  4. print(thisdict)