import random a = {'lab-1': '短视频', 'lab-1': '直播'} print(random.choice(list(a.keys()))) # 从keys的list中随机返回一个元素 print(random.choice(list(a.values()))) # Read More
posted @ 2022-08-10 21:29 eosclover Views(115) Comments(0) Diggs(0) Edit
import random idList = ['11', '22', '23', '34', '35', '14', '45', '66', '88', ] def get_randomID(): "返回一个字符串" if len(idList) == 0: print("idList中没有数据, Read More
posted @ 2022-08-10 21:02 eosclover Views(560) Comments(0) Diggs(0) Edit
a = -1 # int b = 2.0 # float c = 13.11 # float d = 3.14j # complex print(type(a), type(b), type(c), type(d)) print(a + c) # 加:10.11 print(a - c) # 减:- Read More
posted @ 2022-08-10 20:24 eosclover Views(88) Comments(0) Diggs(0) Edit