Do you want to find the best way to learn Python as a non programmer?
Is Python your first programming language?
The best way to learn Python is to have a project that you want to complete, learn what you need to know and then make the project work.
Most people start by searching amazon for the “best python book” or googling “how to learn python fast” Or sign up for a course on Codecadamy.
Firstly there are literally 100’s of Python books out there and there are also no shortcuts to learning Python fast. The best way is to keep your focus when learning the basics and the best way to do that is to have a project that you want to complete.
Learn Python Shortcut Menu
- Installing Python
- Python 2 vs 3
- Best Python Books
- Very Simple Program
- Python Object Types
- Numeric Types
- Lists & Strings
- Python Programming Tutorial
- Python Programming Examples
Learn Python for Beginners
This post is going to be a long one so if you want to jump straight to the section that is relevant to you please use the shortcut menu above.
If you are completely new to Python and want to start at the beginning then read on. Python programming has become one of the hot skills to learn for 2019 and a lot of people want to learn it. You can either learn Python the hard way or the easy way.
The hard way is to just read a book, which to most people is going to be very dry and boring. The easy and more enjoyable way is to be programming and doing as you are learning, this way you will start to see your progress and will want to continue to learn.
A lot of people ask me is Python easy to learn, if they can learn Python in a month or a week or a day and the answer to that is you can learn a bit of Python in a month but to become proficient with this programming language you just need to be putting some consistent time to your learning.
This post is aimed at the complete beginner so I will be starting at the beginning!
What is Python?
The complete description from python.org is below
Python is an interpreted, interactive, object-oriented programming language. It incorporates modules, exceptions, dynamic typing, very high level dynamic data types, and classes. Python combines remarkable power with very clear syntax. It has interfaces to many system calls and libraries, as well as to various window systems, and is extensible in C or C++. It is also usable as an extension language for applications that need a programmable interface. Finally, Python is portable: it runs on many Unix variants, on the Mac, and on Windows.
That is a long winded description – basically it’s saying that Python is an interpreted high-level programming language for general-purpose programming. Created by Guido van Rossum and first released in 1991, Python has a design philosophy that emphasizes code readability.
An interpreted language is high level language run and executed by an interpreter (a program which converts the high-level language to machine code and then executing) on the go. Other languages like C need compiling before they run. This makes Python very easy to get started with.
Installing Python on Windows
If you are running Windows you will have to install Python, however if you are running a Mac or Linux based computer Python should already be installed.
To check this on your Linux computer simply type python at a terminal prompt and you should see something like this
You can also do this from a command prompt in windows, click on the start button and type cmd then click on Command Prompt and type in python
You will see here that Python is not installed, so we need to head over to python.org/downloads/windows and download it. Click on the latest Python 3 release and at the bottom of that page select the download suitable for your system. Either the 32 or 64 bit version. I am running a 64 bit Windows 10 laptop so have highlighted the version I am downloading in red
Once you have downloaded the file double click on it and click on Install.
Now when you type python into the command prompt you should see something different. If you still don’t see Python you may need to add it to your environment variables. The easiest way to do that is to run the setup again and this time click on Modify and then Next and then at the screen below tick the box that says add Python to environment variables.
Then click Install again and it should say Modify was Successful
Open Command Prompt again and type python and you should see the below
This is the very basic way to access and verify Python is installed.
Python 2 vs 3
Python 3.0 was released in 2008 and it was hoped that it would replace Python 2 by 2015 however it was not backwards incompatible and many programmers resisted moving to version 3 for many years. Even today many Python applications are written in version 2.
However for new students learning Python in 2019 it is advised that you start learning Python 3 – it might make sense to learn the differences to Python 2 but it would be advised to focus your learning on Python 3.
Best Python Books
There are 100’s of Python books promising to teach you Python, so which ones do you read?
We would recommend one book to get started with and that is
Introducing Python from O’Reilly books.
TO BE COMPLETED
I hope you found that this was the best Python tutorial you have read online and that you actually learnt something and want to continue to learn Python