Skip to content

Commit 7b4ae2c

Browse files
author
Riya H
authored
Update update() - Add:Append Values to Dictionary.py
1 parent 6c989b0 commit 7b4ae2c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Dictionaries/update() - Add:Append Values to Dictionary.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
### Sets - Add/Append Values to a Set ###
2-
1+
### Append Values to dictionary ###
32

43
dict1 = {1: 'Python', 2: 'Java', 3: 'C++'}
54

65
# Add/append values to the dictionary using update() function
7-
86
dict1.update({"4": "Ruby"})
97

108
# print updated dictionary

0 commit comments

Comments
 (0)