Aside from storing data, dictionaries and lists can also make it easier to write clean code. They can replace cumbersome if/elif, match/case, and long 'or' chains with something simpler.
The difference is short-circuit evaluation, a subtle yet sometimes very significant difference. In short-circuit evaluation, the computer executes the minimum code to figure out the value of a boolean expression.
I've seen many misconceptions about this even in Python lessons and tutorials that teach about the topic. Let's first take a look at what it all means. In a pass-by-reference call, if the function makes an assignment to an argument, the original passed variable also changes. In a pass-by-value call, if the function makes an assignment to an argument, only a local copy changes and the original stays the same.