
After several years working in life-science research, I felt the desire in my heart of training myself in understanding data better. I knew there was a ‘Data Science’ major exist while I was working in my University, always tempted to register classes, but never got time. Later I left my job, finally I had the time to learn what I always dreamed of, then the question came: Where should I start to learn?
So, I started randomly learning, did courses in machine learning from great resources like Udemy and Kaggle. After that, I jumped directly to a pretty high-level machine learning competition on Kaggle and noticed what level I was and yet there were so much I need to learn that I lost myself where I should start.
Rebecca Vickery and my friend Svetlana Kurilova help me realized I made 2 mistakes while doing course learning: I did not set a learning goal; I did not actively build on what I learned and explain them to others. Rebecca’s goal-oriented learning and methodology of Learn-Built-Explain framework could apply to anything anyone wants to learn.
After that, I started from python, which I admit I am at level 0. To start, you can find any course level resources, like docs.python.org, Udemy, Coursera, Kaggle etc. The key thing you do is to learn and have practical problem-solving experience right after learning, and then write it and explain to others.
Last week, the goal for me is to download Jupiter Notebook, learn datatypes, variable assignment, indexing, Boolean print, return, if conditions, for loops and functions and use them to solve problems, then explain them. I am going to walk you through those concepts one by one and then use them to basic real problems so you can also do these.
Jupyter Notebook
Jupyter Notebook is one of an open source web application that support python code containing live code, equations, visualization, and text. One way that you can access Jupiter Notebook is to download from anaconda website (https://www.anaconda.com/products/individual) and install anaconda individual edition that contains Jupyter Notebook. You can use Jupyter Notebook to generate any .ipynb files and share or open shared .ipynb files.
Datatype
Numbers, number arithmetic
Numbers could be either integers or decimals, and you can use python as calculator like the following example.

strings
Strings use single quote or double quote, if there already has single quote in words, then use double quote.

List
List could contain numbers, strings, tuples.

Dictionary
Dictionary use {}, similar to list, but in the format of ‘key’:value.

Tuples
Tuples use ( ), values within Tuples are immutable , meaning you can’t change the values of the tuple.

Variable assignment


Print and return
The differences of print and return is that print won’t store data while return does. Python complains in the following example due to that return only used with function discussed later.


Indexing
Python Indices start from 0, if the whole number of element in a datatype is n , then the range of full indices will be [0:n], n not included, to get single element, this can be done like following examples.




Booleans
Booleans are programming statement of True for right or False for wrong.


if condition

for loops

functions
In the following examples, print and return get the same results, however, print won’t store the data, while return store the data, to check the results, you type(myfunc(lst)), print results shows Nonetype, while return results shows list datatype.


functions with for loops and if conditions

append

range, split, len, join

Now, it is Your turn for exercises and practice, find any online for solving problems right after each learning. If you can’t solve the problem, please search resources, documents. If you are tempted to check the solutions, fail at least another 10 times before doing that.
practice resources:
- https://pynative.com/python-data-structure-exercise-for-beginners/
- https://pynative.com/python-if-else-and-for-loop-exercise-with-solutions/
- https://pynative.com/python-functions-exercise-with-solutions/
- https://www.pythonwhiz.com/python-functions-exercises
- make up your own problems and solve them, the above examples are all made up by me, you can do it too, it takes more time, but totally worth it.
After that, write out what you learned, share with friends and strangers. Find motivation for writing, I am motivated by other writers especially Tim Denning.