Commit 5abfad15 by BellCodeEditor

save project

parent 2c6cf785
Showing with 9 additions and 3 deletions
......@@ -3,11 +3,17 @@ name=input('你叫啥名啊?')
power=int(input('你臂力多少啊?'))
list_hero=['猴三',10,'猴一',21,'猴五',22,'猴队长',29,'猴七',30]
iuwu={'猴三':10,'猴一':21,'猴五':22,'猴队长':29,'猴七':30}
#查看字典值
print(iuwu["猴七"])
#修改字典值
iuwu['猴队长']=89
print(iuwu["猴队长"])
print(list_hero)
# 请注释掉上面的代码,并在下一行创建一个名为dict_hero的字典
#新增键值对
xccx={}
xccx['她她她']=12222222
\ No newline at end of file
xccx['她她她']=12222222
#判断元素是否在字典里
if '她她她' in xccx:
print(xccx["她她她"])
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment