Created
March 1, 2022 04:04
-
-
Save alikarimi120/578d4244cbc0c786cc36e19b92cdc145 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
d = {'cat': 'cute', 'dog': 'furry', "age":5, 'arr':[4,8], 6.3:8} # Create a new dictionary with some data | |
print(d) | |
print(d['cat']) # Get an entry from a dictionary; prints "cute" | |
print('cat' in d) # Check if a dictionary has a given key; prints "True" | |
print(d[6.3]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment