import random
Bandit="B"
List=["","","",""]
事情是這樣的:
import random
List=["","","",""]
List[i]='B'
for i in range(0,2):
print(random.randint(List[i]))
阿卡不起作用
我希望它打印出來使用的是什麼功能如:
print["B","","B",""] or ["","B","","B"] and all the other combinations
在python中,我使用隨機生成的變量在列表中進行遊戲,但並不知道如此。 –