no message

This commit is contained in:
陈银军
2025-12-08 17:42:00 +08:00
parent e0b6e8974a
commit 38e87dfbf9
2 changed files with 2 additions and 1 deletions
-1
View File
@@ -2,5 +2,4 @@
def hehe(a,b,c): def hehe(a,b,c):
print('hehe:'+a+b+c) print('hehe:'+a+b+c)
hehe('x','y','z') hehe('x','y','z')
+2
View File
@@ -2,11 +2,13 @@
# 元祖不能修改、删除 有序,可重复,不可扩展 # 元祖不能修改、删除 有序,可重复,不可扩展
# 元祖可以作为字段的key # 元祖可以作为字段的key
a = ('键盘','鼠标') a = ('键盘','鼠标')
b = ('键盘','鼠标','鼠标')
contacts = { contacts = {
'name':'张三', 'name':'张三',
'sex':"男", 'sex':"男",
'salary':'8000' 'salary':'8000'
} }
print(b)
contacts[a] = 'xxx' # 元祖作为字典的key contacts[a] = 'xxx' # 元祖作为字典的key
print(contacts) print(contacts)
print(contacts[a]) print(contacts[a])