Day 2: Allison's Gonna Learn Python

Day 2: Allison's Gonna Learn Python

Day 2: pick a tutorial

After giving it about two minutes consideration, I’m going to do the Official Python Tutorial. Think Python looks super comprehensive but more like a reference guide than a How To.

As suggested by Python Anywhere, I’m skipping sections 1 and 2 and starting with 3. Hmm, I guess I can’t type in the file, I need to use the interpreter. It’s more like a command line window and less like a saved program. But hey! I can make it math! That’s a good start.

Ooh, errors are right there in the CLI. That is handy when I accidentally add a leading space. This is reminding me strongly of creating an IOT network in a Cisco virtual lab environment. And also yay I can copy paste! Some of these arithmetic strings are long and I don’t feel like typing them. She says while live blogging. 

My fingers are so used to typing SAS syntax that I’m tripping over some of the characters. Like using the \ to escape quotes. This is an interesting set of rules for single and double quotes though. It feels very logical to me so far. I also like the (using SAS vocabulary again) macro variable calls to assign values to variables, even strings. I am a long way from doing anything real but this is moving along and paced nicely.

Ah crap, I already forgot that # is for comments. No wonder that line didn’t make sense. I still feel like all I’m doing is the equivalent of %let statements and printing to my log. But it’s literally the ‘introduction’ module. And I do love concatenating. That’s a weird sentence and yet it’s true. Concatenating and substringing. Those are awesome functions. Although putting my character index count inside square brackets instead of parentheses feels weird. I have to think of it as spelling instead of punctuation. It’s just spelled differently than SAS or SQL.

There is zero chance that somebody writing Python documentation that has already invoked ‘spam’ and ‘eggs’ in their examples is using the number 42 by accident. I like these people.

And the section ends with a Fibonacci sequence example. Nice. I will definitely continue tomorrow.

That’s fantastic! How’s it going so far?

Good luck and have fun! I use Spyder as my Python IDE. It’s free. Considering downloading it. You can highlight a snippet of code and press Ctrl-enter and just run that snippet (just like sas). Others on my team prefer jupyter notebooks.

To view or add a comment, sign in

Others also viewed

Explore content categories