Start Your First Python Lesson

What will we cover?

We will take you from knowing nothing about Python, what to install to get started, how to write your first programs, make a few interactive programs, and learn a few string methods.

Finally, if you still are hooked, guide you to our free 8 hours Python course for beginners, which is a 17-lesson course, including 17 projects and 17 video tutorials you can follow along.

Step 1: Install JuPyter Notebook and Launch your first Notebook

Anaconda installs all you need and it is free. That is, it installs Python, most of the libraries you need, and a simple interactive environment to develop Python code in, the JuPyter Notebook.

Shortly explained.

  • Anaconda installs all and you can launch JuPyter Notebook from Anaconda Navigator (often just called Anaconda).
  • JuPyter Notebook can navigate through your files and open Notebooks, where you write your code.

How to get started?

  1. Go to Anaconda and download the individual edition (it is free). 
  2. It will install Python and Jupyter notebook. That is all you need to get started and it is all free.
  3. Launch Anaconda Navigator.
  4. Anaconda launched Jupyter Notebook.
  5. Navigate to a place where you want to save your files.
  6. Create a new Python Notebook with the “new” menu on the right.

Step 2: Write your first program “Hello, World!”

Click on the first cell and write the following code.

print('Hello, World!')

Press SHIFT-ENTER to execute it.

It should print “Hello, World!” below the cell.

The Hello, World! program is traditionally the first program you write in a language, which demonstrates the syntax.

Python has very little syntax and is easy to use. To compare with other languages see Wikipedia.

Step 3: Input a string from the user

Making programs interactive is fun. The first step is to get the user to type something and let your program do something with that.

s = input("What is your name? ")

Look at the code and guess what it does.

Then copy the code into a cell and execute it.

What happened?

It prompted you for something – and you might type some letters, say, your name. Then what will it do? Yes, print your name.

Step 4: Your first interactive program

Actually, you have the tools now to make simple interactive programs.

Let’s try that now.

name = input("What is your name? ")
print("Hello", name.capitalize())
age = input("How old are you? ")
print("You are", age, "years old")

See how simple that is.

Well, you learned a few things here.

if you have a string (like, name), then you can apply capitalize() on it. What does it do?

Well, if you type your name in lowercase, then it will capitalize your name for you. If it already is capitalized, it will do nothing.

Now that is smart.

Step 5: A few methods on strings

Like, capitalize() there are a lot of other methods you can apply.

In the beginning, you probably worry about remembering them all. I got good news for you – you do not need to. You will most likely only use a few and the others you will look up when you need them.

But a few ones that can be funny to master are the following.


Try to copy each one into a cell by itself and see what it does. It will most likely make sense to you.

Notice, if you copy them all into one cell in JuPyter Notebook, then it will only give the output of the last statement of the cell. Therefore, try one line at a time in one cell.

Notice, that the “Rune” is a string and the methods could be applied to variables as well.

s = "Rune"

Step 6: Replace something in a string

My favorite and most used string method is replace(.)

Let’s just try it.

name = "Rune"
name.replace('R', 'S')

Put it into a cell and execute.

It will output Sune. It will change all occurrences of R to S.

Notice, that these methods are case sensitive, meaning, that the following code.

name = "Rune"
name.replace('r', 's')

It will output Rune because there is no lowercase r to replace.

Step 7: What next?

I am happy you asked.

If this is something you like and you want to get started with Python, then this is the first lesson of an 8 hours FREE video course with full explanations, projects on each level, and guided solutions.

Check out the first lesson here.

What about the full course?

The course is structured with the following resources to improve your learning experience.

  • 17 video lessons teaching you everything you need to know to get started with Python.
  • 34 Jupyter Notebooks with lesson code and projects.
  • 2 FREE eBooks to support your Python learning.

See the full FREE course page here.

Click and get started on your journey to Python Mastery

Learn Python


  • 70 pages to get you started on your journey to master Python.
  • How to install your setup with Anaconda.
  • Written description and introduction to all concepts.
  • Jupyter Notebooks prepared for 17 projects.

Python 101: A CRASH COURSE

  1. How to get started with this 8 hours Python 101: A CRASH COURSE.
  2. Best practices for learning Python.
  3. How to download the material to follow along and create projects.
  4. A chapter for each lesson with a descriptioncode snippets for easy reference, and links to a lesson video.

Expert Data Science Blueprint

Expert Data Science Blueprint

  • Master the Data Science Workflow for actionable data insights.
  • How to download the material to follow along and create projects.
  • A chapter to each lesson with a Description, Learning Objective, and link to the lesson video.

Machine Learning

Machine Learning – The Simple Path to Mastery

  • How to get started with Machine Learning.
  • How to download the material to follow along and make the projects.
  • One chapter for each lesson with a Description, Learning Objectives, and link to the lesson video.

Leave a Comment