Created
July 15, 2019 21:32
-
-
Save zeyneloz/b177130b0bc49b2c717661e58aea1399 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
spaceships = {...} | |
def get_random_ship(): | |
key_list = list(spaceships.keys()) | |
# Pick a random key from key list | |
id = random.choice(key_list) | |
return spaceships[id] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment