|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
- import random
- students = []
- for i in range(1,57):
- students.append('{}号'.format(i))
- print('开始抽取<1>实习点实习同学的学号')
- A = random.sample(students,16)
- print(A)
- for a in A:
- students.remove(a)
- print('开始抽取<2>实习点实习同学的学号')
- B = random.sample(students,20)
- print(B)
- for b in B:
- students.remove(b)
- print('开始抽取<3>实习点实习同学的学号')
- C = random.sample(students,20)
- print(C)
复制代码
本帖最后由 森亦简 于 2022-5-27 16:44 编辑
for i in range(1,57):
if not i == 你要剔除的
students.append('{}号'.format(i))
print('开始抽取<1>实习点实习同学的学号')
|
|