Python learning resources
Beginner to advanced Python guides, cheatsheets, books and projects.
For data science, backend and automation.
Join π https://rebrand.ly/bigdatachannels
DMCA: @disclosure_bds
Contact: @mldatascientist
Post #1271
671
π§ Think Like Python
Suppose you want to know if a username exists.
π» Many beginners write:
π’ Python gives you a simpler solution.
Less code. More readable. Usually faster to understand.
Whenever Python has a built-in way to express an idea, prefer it.
Suppose you want to know if a username exists.
π» Many beginners write:
found = False
for user in users:
if user == "Alex":
found = True
break
π’ Python gives you a simpler solution.
found = "Alex" in users
Less code. More readable. Usually faster to understand.
Whenever Python has a built-in way to express an idea, prefer it.
- β€ 3



