r/PythonLearning 9d ago

Python Data Model Exercise

Post image

An exercise to help build the right mental model for Python data. - Solution - Explanation - More exercises

The โ€œSolutionโ€ link visualizes execution and reveals whatโ€™s actually happening using ๐—บ๐—ฒ๐—บ๐—ผ๐—ฟ๐˜†_๐—ด๐—ฟ๐—ฎ๐—ฝ๐—ต.

67 Upvotes

39 comments sorted by

View all comments

1

u/OopsAllCharisma 8d ago

What's the line b = b + [3] for?

1

u/Sea-Ad7805 8d ago

Line b = b + [[3]] adds [3] to the b list, and this exercises is about how this relates to a. First think about it, then check the Solution.