Python – Dict

List of commands for dictionaries (Dict) in language Python

Create a dictionary:


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

Add or replace:


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 *