六祎-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))

 

全部评论

相关推荐

合适才能收到offe...:招聘上写这些态度傲慢的就别继续招呼了,你会发现hr和面试官挺神的,本来求职艰难就可能影响一些心态了,你去这种公司面试的话,整个心态会炸的。
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务