Skip to content

Instantly share code, notes, and snippets.

@leopard627
Created January 30, 2019 16:04
Show Gist options
  • Save leopard627/2d80637f703686cc04b17694687cb356 to your computer and use it in GitHub Desktop.
Save leopard627/2d80637f703686cc04b17694687cb356 to your computer and use it in GitHub Desktop.
my_dictionary = {"a": 1, "b": 2, "c": 3}
# {'a': 1, 'b': 2, 'c': 3}
my_dictionary.keys()
# dict_keys(['a', 'b', 'c'])
list(my_dictionary.keys())
# ['a', 'b', 'c']
assert 'a' in my_dictionary.keys()
# PASS
assert 'a' list(in my_dictionary.keys())
# PASS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment