import random if __name__ == '__main__': print (sorted(random.sample(range(1,36),5))+(sorted(random.sample(range(1,13),2))))#该片段来自于http://www.codesnippet.cn/detail/291020136752.html
来源: http://www.codesnippet.cn/detail/291020136752.html