六祎-简单的排版表(python)

import random
 
team_one = ['王奇', '王晶', '吴以岳', '李建国']
team_two = ['周智', '郭国强', '孙闯商', '唐强国']
team_three = ['孙兵强', '朱宁', '石一楠', '柳名跃']
team_four = ['王虹懵', '牛丽丽', '杨宏涛', '庞海涛']
for i in range(2):
    for a, b, c, d in zip(random.sample(team_one, 4), random.sample(team_two, 4), random.sample(team_three, 4),
                          random.sample(team_four, 4)):
        print('{}\t{}'.format(a, c))
        print('{}\t{}'.format(b, d))
    for a, b, c, d in zip(random.sample(team_one, 4), random.sample(team_two, 4), random.sample(team_three, 4),
                              random.sample(team_four, 4)):
        print('{}\t{}'.format(c, a))
        print('{}\t{}'.format(d, b))

 

posted @ 2022-04-26 00:55  你好,Alf  阅读(2)  评论(0编辑  收藏  举报