How can i concatenate 2 dictionary values | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How can i concatenate 2 dictionary values

15th Oct 2018, 10:12 AM
abinaya
abinaya - avatar
4 Answers
0
If you mean add/edit a dict with another one, use .update method d= {"a":1, "b":2} e= {"a":10, "c":3} d.update(e) print(d)
15th Oct 2018, 10:19 AM
KrOW
KrOW - avatar
0
can I know what is the purpose of .update?
15th Oct 2018, 10:19 AM
abinaya
abinaya - avatar
0
make a list of values and index slice the 2 you need?
15th Oct 2018, 11:23 AM
Steven M
Steven M - avatar
0
abinaya Its always useful read documentation when some info are needed https://docs.python.org/3/library/stdtypes.html#dict.update
15th Oct 2018, 12:00 PM
KrOW
KrOW - avatar