Skip to content

Instantly share code, notes, and snippets.

@Echocage
Last active April 18, 2016 20:55
Show Gist options
  • Save Echocage/2318ca6622254a2af23c2806b4fe960f to your computer and use it in GitHub Desktop.
Save Echocage/2318ca6622254a2af23c2806b4fe960f to your computer and use it in GitHub Desktop.
class example(object):
stuff = "nothing"
def test():
return "Blah blah"
library = {1: "toy",
2: "box",
3: "name",
4: example(),
5: example().stuff,
6: test()}
for num, string in library.items():
print(num, string)
print("\n\nYou can also do it like this...\n")
new_library = ["dog", "cat", "home", example().stuff]
for num, string in enumerate(new_library):
print(num, string)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment