Nkrs Taught a friend to write some code today, and we used Python 3 for a couple of reasons. First is that Python in general enforces clean and properly formatted code, and the other are specific to version 3 -- strings are Unicode by default, so no unexpected and hard to explain results like getting 2x the size when calling len() on strings with Cyrillic letters (and no advanced lessons like Unicode on day one!), and that input() always returns a string, which was a useful lesson in data types and how the computer sees numbers and text.
Login or register your account to reply
🏒 Lucian Marin The only problem is that Python 3 is getting slower with each new version. I'm still using Python 2 on sublevel.net and for local development. Python is the nicest language out there and still faster than Ruby, Haskell, etc.
9y, 19w 2 replies
Nkrs I honestly don't know anything about Python's performance. The goal was to teach her the basics of how a computer understands programs: types, variables, constants, functions, loops, conditionals, and even some algorithms and recursion, all of which are dead easy to do and explain in Python.
9y, 19w reply
Bjd2385 I was digging around and I found a presentation on the speed of Python 3.3 in comparison to 2.7. I haven't tried it yet, but I like some of the extended syntax tricks mentioned in this presentation. speakerdeck.com/py...
8y, 15w reply