Результаты поиска: "#pythonlearn"

20 результатов
Alican Donmez
Alican Donmez@flowfelis·
Day 51/100 of #100DaysOfPythonTips 🐍 Most if / elif chains are a code smell. If your logic looks like this: “If A do this, if B do that…” You probably need a dispatch table — not more ifs. Use a dictionary that maps keys → functions. #Python #pythonlearn #100DaysOfCode
Alican Donmez tweet media
English
0
0
0
17
Alican Donmez
Alican Donmez@flowfelis·
Day 46/100 of #100DaysOfPythonTips 🐍 Python’s for loop has an else. The else block runs only if the loop didn’t break. “If I never found it, do this.” It’s perfect for search logic — clean, readable, and almost nobody uses it.🧠🐍 #Python #pythonlearn #100DaysOfCode
Alican Donmez tweet media
English
0
0
0
6
Alican Donmez
Alican Donmez@flowfelis·
Day 42/100 of #100DaysOfPythonTips 🐍 * set is implemented as a hash table → average O(1) lookup * list is a dynamic array → O(n) linear scan * If you care about existence, use a set. * If you care about order or duplicates, use a list. #Python #pythonlearn #100DaysOfCode
Alican Donmez tweet media
English
0
0
0
19