Maru Kun

20%
Flag icon
We start by defining the same dictionary that we’ve been working with. We then print this dictionary, displaying a snapshot of its information. At ➊ we add a new key-value pair to the dictionary: key 'x_position' and value 0. We do the same for key 'y_position' at ➋. When we print the modified dictionary, we see the two additional key-value pairs:
Python Crash Course: A Hands-On, Project-Based Introduction to Programming
Rate this book
Clear rating