4 ms·
I'm learning Python as part of a data science class and not for building web apps. This article mentions a-ha moments in relation to Python conditionals. What
by wodenokoto 12y ago
I'm learning Python as part of a data science class and not for building web apps.
This article mentions a-ha moments in relation to Python conditionals. What is so special about Python conditionals? They seem pretty ordinary to me.
- ovis 12y agoImagine that you're learning your first programming language. You don't read Hacker News, and you can't imagine why having curly braces on a keyboard is more useful than a snowman character. Then, getting a working conditional statement might be a revelation. I still remember the first program I ever wrote. It was about 15 years ago, and all it did was convert a Celsius temperature to Fahrenheit in C. It was thrilling, and I don't think it even included a conditional!
- lmm 12y agoIf that first language is python you may get quite a long way before you see any reason why having curly braces on a keyboard is more useful than a snowman character :)
- marcosdumay 12y agoDictionaries rule.
- hartleybrody 12y agoFor me, the big aha moment with Python specifically was grokking list comprehensions. That was a great day.
- sergiosgc 12y agoTrue. The moment you realize you rarely ever need a classical for cycle -- for (i=0;i<100;i++) -- is truly a Aha moment.
- deckiedan 12y agoAlso related, the whole generator/iterator pattern, and how by designing your logic into the right kind of objects, you can create extremely elegant interfaces.
- nsomaru 12y agocould you point out some resources for the same?
- pizza 12y agoI think understanding conditionals lies somewhere between "well how do I use this stuff?" to "Eureka!"