import random
team = ['周五就是浪', '欢迎来到对抗路', '起飞队', '干饭队', '十三大队', '复活队']
random.shuffle(team)
n = 2
[' vs '.join(team[i:i+n]) for i in range(0, len(team), n)]
image.png
import random
team = ['周五就是浪', '欢迎来到对抗路', '起飞队', '干饭队', '十三大队', '复活队']
random.shuffle(team)
n = 2
[' vs '.join(team[i:i+n]) for i in range(0, len(team), n)]
image.png
本文标题:python 随机分配比赛队伍
本文链接:https://www.haomeiwen.com/subject/ukrvlltx.html
网友评论