My 2015 includes learning Python, an open-source programming language that will help me manipulate giant databases and create some super interesting/ridiculous programs. I learned turbo pascal (HA HA HA HA!) about fifteen years ago so this should be easy as pie (mmmmm pie). Okay, okay, all I’m hoping is that knowing a bit of SAS and SQL plus some old pascal will make my journey a little easier.
Unfortunately, as I’m starting to see, knowing tiny bits of other languages makes it a little bit tricky. While every program shares the same general logic of if then else loops, every program has its own personality, its own grammar. The trick is matching up the grammar with the program. Not so simple since I already mix up SQL and SPSS syntax all the time.
Here are three
crazy annoyances interesting things I’ve learned about Python so far.
1) Python let’s you count to ten using eleven numbers.
Why? Python starts counting at zero. As in, 0, 1, 2, 3. Not 1, 2, 3, 4. This will be why I go over a section of code again and again and again trying to find one lost item.
2) Python let’s you type ^V by simply clicking on Ctrl and v simultaneously.
Did you seriously think hot keys from one program should work the same way in another program? Psh. If you STILL think you want to paste, you need to right click on the spot and…. That’s it. Right click.
3) Python is a good way to learn what EXACTLY three spaces looks like.
Because a tab isn’t a space. And two spaces aren’t three spaces. And four spaces aren’t three spaces. But if you like getting error messages, feel free to use any character that produces a blank space except for 3 blank spaces.