我试着在字典里找到名字和它们对应的键值。 抱歉,如果已经有人问过了。这个代码不工作,因为我在编程和刚开始。请告诉我怎么了。在
theBoard = {'top-L': ' ',
'top-M': ' ',
'top-R': ' ',
'mid-L': ' ',
'mid-M': ' ',
'mid-R': ' ',
'low-L': ' ',
'low-M': ' ',
'low-R': ' '
'Check for closed moves'
def openMoves:
for i in theBoard:
if theBoard[i] == ' ':
print "the move %s is open" % theBoard[i]
else:
print "the move %s is taken" % theBoard[i]
print openMoves()
我想你的标签也掉了。。。在
相关问题 更多 >
编程相关推荐