import random
C_G = ['stone','scissor','cloth']
computer = random.choice(C_G)
WinList = [['stone','scissor'],['scissor','cloth'],['cloth','stone']]
choice_memu = '''
(0)stone
(1)scissor
(2)cloth
please choice(0/1/2):'''
c_win = 0
p_win = 0
d_win = 1
while c_win
number = int(input(choice_memu))
player = C_G[number]
if computer == player:
d_win+=1
elif [player,computer] in WinList:
p_win+=1
if p_win == 2:
print('\033[31myou win!!!\033[0m')
break
else:
c_win+=1
if c_win == 2:
print('\033[32myou lose!!!\033[0m')
break
total_time = p_win + c_win + d_win
print('you guesse: %s times' % total_time,'you lost: %s times' % c_win,'you win: %s times' % p_win,'draw: %s times' % d_win)