Learn Python the Hard Way: 字典

#!/usr/bin/python
# -*- coding: utf-8 -*-

stuff = {'name': 'Zed', 'age': 36, 'height': 6*12+2}

print stuff['name']

print stuff['age']

print stuff['height']

stuff['city'] = "San Francisco"

print stuff['city']

print stuff



你可能感兴趣的:(Learn Python the Hard Way: 字典)