Skip to content

Instantly share code, notes, and snippets.

@albionbrown
Created June 22, 2022 17:03
Show Gist options
  • Save albionbrown/d1b8c092cd01466c8c097f3962720e19 to your computer and use it in GitHub Desktop.
Save albionbrown/d1b8c092cd01466c8c097f3962720e19 to your computer and use it in GitHub Desktop.
# Cards.txt
#rainbow, 10, 28, rainbow.png
#space, 5, 20, space.png
robots = {}
file = open('cards.txt', 'r')
# #print(file.read().splitlines())
for line in file.read().splitlines():
name, battery, intelligence, image = line.split(', ')
robots[name] = [battery, intelligence, image]
file.close()
print(robots)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment