Python - Day 001
PythonDay one of learning Python. Today I decide on learning resources and set up my laptops with the necessary configurations and development environment. Maybe we get a "Hello world" example done as well.
Learning Resources
A DuckDuckGo search for "Learn Python" yields a plethora of results. I settled on the following. Are they the best? Maybe, maybe not. It's hard to say...
- Automate the Boring Stuff with Python by Al Sweigart
- FreeCodeCamp - YouTube "Python for Beginners" playlist
- LearnPython.org by DataCamp
Machine Set Up
There are many different ways to set up macOS for Python development. Ultimately I settled on "How to Install Python on a Mac" from freeCodeCamp.org since it was recently published and quite clear.
I was tempted to use Homebrew to install the tools I needed since I'm familiar with it. However, after reading the article all the way through before doing anything (recommended for all articles), I opted to go with the Rye install method. Install steps were clear and easy to follow.
Note to Self for Further Projects
Since I went the Rye route, adding libraries to projects is a bit different than using Pip, which more experienced Python devs are familiar with. This link is for my own benefit to come back to until the muscle memory is locked in as I'm working through tutorials and need to add libraries:
Remember, when you see pip install in a tutorial, you can use rye add and rye sync instead, without additional commands for a virtual environment.
Hello World
Finally, after setting up both my personal and work laptops, a simple "Hello world" is in order to be sure everything is working. I didn't reference a tutorial for this, but if you wanted to yourself, I recommend this one.
>>> print('Hello world')
![A terminal window depicting the steps needed to run a simple Python 'Hello world' example.](https://scribbles.page/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBcU5lIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--85af01861ac7ebbf67aed278de8a1d5e74c344cc/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdDRG9MWm05eWJXRjBTU0lJY0c1bkJqb0dSVlE2RkhKbGMybDZaVjkwYjE5c2FXMXBkRnNIYVFJQUNHa0NBQVk2Q25OaGRtVnlld2M2Q25OMGNtbHdWRG9NY1hWaGJHbDBlV2xrIiwiZXhwIjpudWxsLCJwdXIiOiJ2YXJpYXRpb24ifX0=--768aeab7fb7843d85fe5b2b4ba237e06e6ef604f/Python-helloWorld.png)
See you on day 002!