import random
def Random():
t=[i for i in range(1,14) for j in range(4)]
t.extend([15,20])
random.shuffle(t)
return sorted(t[0:20]),sorted(t[20:40])
def Is(l):
#作用:识别list是什么组合类型
if len(l)==1:
key=1#单牌
elif len(l)==2 and l[0]==l[1]:
key=2#对子
elif len(l)==3 and l[0]+4==l[1]+2==l[0]:
key=3
elif len(l)==4 and (l[0]==l[1]==l[2] or l[0]+1==l[1]+1==l[2]==l[3]):
key=4#2连对或三带1
elif len(l)==5 and l[0]+4==l[1]+3==l[2]+2==l[3]+1==l[4]:
key=5#顺子
elif len(l)==6 and (l[0]+2==l[1]+2==l[2]+1==l[3]+1==l[4]==l[5] or l[0]+5==l[1]+4==l[2]+3==l[3]+2==l[4]+1==l[5]):