r/pythontips • • Oct 17 '21

Syntax Python Beginner Mistakes

As a Python trainer, I get to work with pynewbies across the spectrum. It doesn't matter whether they are from college or years into the industry when learning Python. The simplest language on the earth is not that intuitive. Things get even more challenging when they are well versed in a Typed-Object-Oriented-Language

I have compiled some of the common mistakes that beginners make.

https://thelearning.dev/python-beginner-mistakes

52 Upvotes

12 comments sorted by

View all comments

3

u/srpwnd Oct 17 '21

I think you should mention that you could (should) write the ternary operator code as: result = INVALID_INPUT if name == ‘’ or email == ‘’ else f”{name}\n{email}\n{designation}”