Python – Dict

List of commands for dictionaries (Dict) in language Python

Create a dictionary:

Or:

dic = {‘dict’: 1, ‘dictionary’: 2}

Add or replace:

Delete:

Return a key and value pair:

Return dictionary values:

Vocabulary and meaning

for key, value in dic.items():
print(key, value)

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *