【Python】利用装饰器实现斗地主之洗牌和抓牌,效果杠杠的!
import random
str_L=['2','3','4','5','6','7','8','9','10','J','Q','K','A']
color_L=['红桃','黑桃','方块','梅花']
l=['大王','小王']
for i in str_L:
for j in color_L:
l.append(j+i)
#洗牌
def washCards(func):
def...
原创
2018-09-25 17:33:31 ·
952 阅读 ·
0 评论