webster = {
"Aardvark" : "A star of a popular children's cartoon show.",
"Baa" : "The sound a goat makes.",
"Carpet": "Goes on the floor.",
"Dab": "A small amount."
}
for k in webster:
print webster[k]
#A star of a popular children's cartoon show.
#Goes on the floor.
#A small amount.
#The sound a goat makes.
remove的用法(删除特定元素)
1
2
3
4
a = ['gg','tt','ty']
a.remove('gg')
print a
#['tt','ty']
del的用法(删除index)
1
2
3
4
a = ['gg','tt','ty']
del a[1]
print a
#['tt','ty']