octopusList = {"first": ["red", "white"],
"second": ["green", "blue", "red"],
"third": ["green", "blue", "red"]}
squidList = ["first", "second", "third"]
for i in range(1):
squid = random.choice(squidList)
octopus = random.choice(octopusList[squid])
print squid + " " + octopus
누구든지 JavaScript로 작성하는 데 도움이 될 수 있습니까? 필자는 대부분의 프로그램을 JavaScript로 작성했지만, JavaScript로 작성된 목록으로 목록을 가져 오는 방법은 특히 혼란 스럽습니다. 나는 프로그래밍에 익숙하지 않으므로 내 질문에 답해 주셔서 감사합니다. : DPython을 JavaScript - 목록으로 변환 하시겠습니까?
+1 cephalapods – Cole