## 1. Using return instead of print inside a loop
This one bit me early on. I wanted to print every item in a list, so I wrote something like this:
python
def show_items(items):
for item in items:
return item
show_items(["apple", "banana", "cherry"])
Run it, and... nothing prints. Why? return doesn't just output a value it...
🔧 Programmierung
⚡ iShareStuff Intelligence
📰 VERIFIED NEWS INTELLIGENCE ID: #3674877
🔧 "5 Python mistakes I keep making as a beginner (and how I fixed them)"
⏱️ vor 14h 50m (04.08.2026 um 13:33 Uhr) 📖 4 Min. Lesezeit 📂 🔧 Programmierung 📡 Feed 🔗 Quelle: dev.to
Schrift:
Verwandte Videos & News · KI-empfohlen via Levenshtein-Match
🎯 43% Match
📆 27.07.2022 um 19:14 Uhr
▶ Abspielen
🎯 41% Match
📆 07.02.2023 um 00:00 Uhr
▶ Abspielen
🎯 41% Match
📆 05.12.2019 um 21:41 Uhr
▶ Abspielen
🎯 41% Match
📆 09.02.2018 um 21:00 Uhr
▶ Abspielen
🎯 41% Match
📆 06.11.2017 um 17:00 Uhr
▶ Abspielen
🎯 39% Match
📆 28.04.2020 um 21:30 Uhr
▶ Abspielen
🎯 38% Match
📆 16.05.2021 um 00:30 Uhr
▶ Abspielen
🎯 37% Match
📆 19.09.2019 um 18:47 Uhr
▶ Abspielen
← Horizontal scrollen für mehr Empfehlungen → · Klick auf ein Video zum Abspielen im Hauptplayer