It's time to learn a new language! Python!
Python is a popular, easy-to-use programming language that has significant traction in the field.
Remember the goal is learning to learn, so keep track of what works for you and what doesn't as you go through the process of exploring Python.
-
Try to relate things you already know in another language (e.g. what an array is) to the corresponding things in Python (e.g. a list) and how to use them.
-
Write a bunch of "toy programs" that demonstrate different key features of the language
-
Explore the standard library that's available for the language. Skim it briefly for now--the idea isn't to memorize everything but to file away generally what functionality is available.
-
Write a more substantial toy program that uses a variety of the features.
Again, keep track of what works for you. Try different things to see what works best for learning new languages.
- Installing Python and pipenv
- JavaScript<->Python cheatsheet
- How to read Specs and Code
- Python 3 standard library
-
Make sure you have Python 3 and pipenv installed.
-
Go to the directory with the
Pipfile
and runpipenv install
-
After the install completes, run
pipenv shell
This will get you into the virtual environment. At this point, you should be able to run Python 3 by just running
python
:$ python --version Python 3.6.5
You can exit the virtual environment by typing
exit
.
- Learn the basic syntax and structure of Python
- Implement a number of tiny Python programs that demonstrate Python syntax.
Each directory inside the src/
directory presents exercises revolving around a particular concept in Python. Not all of these concepts are unique to Python (in fact, most probably aren't). This means that you can leverage knowledge you've obtained via exposure to other programming languages towards learning Python.
The suggested order for going through each of the directories is:
hello
-- Hello worldbignum
-- Print some big numbersdatatypes
-- Experiment with type conversionmodules
-- Learn to import from modulesprinting
-- Formatted print outputlists
-- Python's version of arraystuples
-- Immutable lists typically for heterogenous dataslices
-- Accessing parts of listscomprehensions
-- List comprehensionsdictionaries
-- Dictionariesfunctions
-- Functionsargs
-- Arguments and Keyword Argumentsscopes
-- Global, Local, and Non-Local scopefile_io
-- Read and write from filescalendar
-- Experiment with module importsclasses
-- Classes and objects