摘要:
可哈希的集合(hashed collections),需要集合的元素实现了__eq__和__hash__,而这两个方法可以作一个形象... 阅读全文
posted @ 2022-10-07 20:32
I'm_江河湖海
阅读(36)
评论(0)
推荐(0)
摘要:
方式1 x = {'a': 1, 'b': 2}y = {'c': 3, 'd': 4}z1 = {**x, **y}print(z... 阅读全文
posted @ 2022-10-07 20:32
I'm_江河湖海
阅读(11)
评论(0)
推荐(0)
摘要:
方式1 x = {'a': 1, 'b': 2}y = {'c': 3, 'd': 4}z1 = {**x, **y}print(z... 阅读全文
posted @ 2022-10-07 20:32
I'm_江河湖海
阅读(8)
评论(0)
推荐(0)
摘要:
1.直接按名字赋值: my_habit = ['game', 'running']friend_habit = my_habitmy... 阅读全文
posted @ 2022-10-07 20:32
I'm_江河湖海
阅读(14)
评论(0)
推荐(0)
摘要:
1.直接按名字赋值: my_habit = ['game', 'running']friend_habit = my_habitmy... 阅读全文
posted @ 2022-10-07 20:32
I'm_江河湖海
阅读(8)
评论(0)
推荐(0)
摘要:
一、单引号和双引号 在Python中我们都知道单引号和双引号都可以用来表示一个字符串,比如 str1 = 'python'str2 ... 阅读全文
posted @ 2022-10-07 20:32
I'm_江河湖海
阅读(93)
评论(0)
推荐(0)
摘要:
一、单引号和双引号 在Python中我们都知道单引号和双引号都可以用来表示一个字符串,比如 str1 = 'python'str2 ... 阅读全文
posted @ 2022-10-07 20:32
I'm_江河湖海
阅读(77)
评论(0)
推荐(0)
摘要:
以下实例展示了 count() 方法的使用方法: # !/usr/bin/python3 T = (123, 'Google', '... 阅读全文
posted @ 2022-10-07 20:32
I'm_江河湖海
阅读(47)
评论(0)
推荐(0)
摘要:
Python中的内置数据结构(Built-in Data Structure):列表list、元组tuple、字典dict、集合se... 阅读全文
posted @ 2022-10-07 20:32
I'm_江河湖海
阅读(17)
评论(0)
推荐(0)
摘要:
Python中的内置数据结构(Built-in Data Structure):列表list、元组tuple、字典dict、集合se... 阅读全文
posted @ 2022-10-07 20:32
I'm_江河湖海
阅读(12)
评论(0)
推荐(0)

浙公网安备 33010602011771号