2014-03-07 37 views

回答

0

回答什麼@chepner評論:

hs = raw_input("HIT OR SHAME YOUR FOREFATHERS! (h or s): ").lower() 
if hs == 'h': 
    player.append(rc(cards)) 
else: 
    break 

或更短:

hs = raw_input("HIT OR SHAME YOUR FOREFATHERS! (h or s): ").lower() 
if hs != 'h': break 
player.append(rc(cards)) 
0

在你的代碼

hs = raw_input("HIT OR SHAME YOUR FOREFATHERS! (h or s): ").lower() 
    if h in s: 
     player.append(rc(cards)) 
    else: 
     break 

而不是

if h in s 

比較

'h' in hs 

我想那就是你錯過的地方。

相關問題