Other answers have addressed the specific mechanic details and examples of when one or the other form would be better, but I want to mention a little further background, sort of philosophical:
You're learning a language.
A language is something in which ideas can be expressed and understood (communicated). A computer programming language has the additional property that it can be mechanically parsed by a machine designed to take action (execute) based on ideas (decisions) that are specified and fed in using that language.
In ANY language that's at all useful, there is more than one way to express nearly any idea expressible in that language.
Consider the wide variety of nuance available in the English language. Even a simple sentence, such as
The cat jumped onto the box.
can be varied to express slightly different ideas or place emphasis on different parts of the scene while referring to the same exact physical universe action.
First are grammatical variations:
The box was jumped onto by the cat.
Onto the box jumped the cat.
Then are wider and wider variations, still referring to the same physical action:
The box shook under the impact of the cat.
The cat came down with a thud upon the top of the box.
The feline leaped lightly into the air and landed neatly on a nearby box.
Just look at the implications of the word "nearby" in that last sentence. Its inclusion conveys a whole new range of concepts not otherwise present.
There is always more than one way to do it, Python Zen to the contrary.
Of course, there will be ONE way which perfectly expresses your intention and is most suitable, just as you would choose only ONE of the English sentences above depending on exactly what you wished to communicate. That's what the Zen of Python is about.
But in an introductory programming course or an introductory English course, you must first learn the various ways (wordings, code snippets) in which you can couch an idea before you will develop the judgment to choose which is most perfectly fitting.