04 MAY 2020 /

Learn Code. Learn Python.

Are you wanting to learn to code but unsure where to start? You’ve come to the right place. I’ll walk you through the reasons to learn Python to help you decide if it’s right for you and provide a list of resources to learn the basics, get your environment set up, find projects to get started with and where you can go for help and support through your coding journey.

Why learn Python?

Python is a versatile programming language that can be used for software development, data analysis, machine learning and even web development! If you’re wanting to program robots, follow a career in Data Science or make pretty visualisations, learning python is a good place to start!

If this is your first experience of learning to code then the syntax (the structure of statements) is similar to English, requires fewer lines of code and once you have the basic grasp of the logic, syntax and structure, it can be easily applied to other programming languages.

However, if you are more focused on web or app development, there may be other programming languages out there that you might want to consider instead. HTML, CSS and JavaScript are also great starting points when learning to code. Don’t stop reading just yet though, many of the resources and tips below are relevant to any new developer!

Resources

Depending on your style of learning, there are different types of courses you can follow. There are written tutorials with code examples, short videos with interactive coding problems, live-coding videos or the simple textbook. I’ve included a range of resources in this list so that you can give them a try and decide which learning style works best for you.

Learn to Code for free


1. FreeCodeCamp

FreeCodeCamp is a dedicated community platform for learning to code. They have courses, tutorials, videos and articles to help you get started and cover many different programming languages. The courses on their website are mainly focussed on web development and are a great starting point if you want to learn HTML, CSS and JavaScript! For python, they have put together a comprehensive guide to resources, as well as a YouTube course.

Programming languages: Python, HTML, CSS, JavaScript + more
Level: Beginner, Intermediate, Advanced
Content type: Articles, Videos, Interactive Tutorials


2. HiPy

HiPy is an open community of people dedicated to introducing anyone and everyone to coding in Python. They run regular events in Liverpool and have a series of beginner-friendly notebooks which you can work through and an Intro to Python course covering how to get started. They also have a YouTube channel and have recently streamed live-coding events that are definitely worth a watch!

Programming languages: Python
Level: Beginner, Intermediate, Advanced
Type: Tutorials, Videos, Events


3. EdX Courses

EdX has a range of python courses available. The courses are free to complete with an option to pay for a certificate. The courses are often run by companies or Universities and you may need to explore to find a course that is the right style for you. I’ve found the courses very hit and miss!

Check out this Microsoft course for an Intro to Python for absolute beginners!

Programming languages: Python, HTML, CSS, JavaScript + more
Level: Beginner, Intermediate, Advanced
Type: Courses


4. Coursera

Similar to EdX, Coursera has a range of different courses available for free, with payment to receive certification.

If you’re looking for an introduction to Machine Learning, I completed Andrew Ng’s Machine Learning course last year and highly recommend checking it out! It provides a broad overview with weekly assignments and questions alongside the course. I really enjoyed the style of teaching and the assignments were interesting and appropriately challenging! My only warning is that the assignments use a programming language called Octave which could sometimes be a little awkward — there is an intro to Octave within the course however if you are new to programming, you might find it a little tricky at times!

Programming languages: Python, HTML, CSS, JavaScript + more
Level: Beginner, Intermediate, Advanced
Type: Courses


5. Kaggle micro-courses

Kaggle is a data science platform which hosts competitions and data challenges. It also provides micro-courses including an introduction to python alongside a YouTube channel with live-coding demonstrations including concepts in python and data science. Once you have the basics and with a foundation in Data Science, you can get involved with the community, practice your skills with the playground competitions such as the Titanic challenge or explore the Kaggle datasets for use in your own projects.

Programming languages: Python
Level: Intermediate, Advanced
Type: Tutorials, Videos


6. W3Schools

W3Schools is a website for learning web technologies, containing code examples and includes interactive tutorials in Python, HTML, CSS and JavaScript. I often find myself referring back to w3 for documentation and detailed explanations with examples of how to use the function or package.

Programming languages: Python, HTML, CSS, JavaScript + more
Level: Beginner
Type: Documentation, Tutorials


7. Udemy

Udemy offers over 100k online courses from a wide range of topics and also in different languages. There is an overwhelming number of python courses from different instructors however you can narrow this down by specifying only free courses and selecting your level and topics you are looking for. I’d recommend learning the basics with the resources above and using Udemy to dive deeper into a specific topic if you are familiar with an instructor and like their teaching style.

Note: Udemy also contains paid courses but they often have a sale on, reducing the price significantly so it’s best to wait for these!

Programming languages: Python, HTML, CSS, JavaScript + more
Level: Beginner, Intermediate, Advanced
Type: Course


8. Automate the Boring Stuff with Python

If you prefer books, Automate the Boring Stuff with Python is a great place to get started and the content is also available online. It provides practical examples on how to get started and project examples you can work through at the end of each chapter.

Programming languages: Python
Level: Beginner, Intermediate
Type: Book


9. Python for Data Science

If you’ve grasped the basics and are looking to explore Python with data science, Python for Data Science is a valuable resource and again is available for free online, although also handy to have a copy to pick up off the shelf!

Programming languages: Python
Level: Intermediate, Advanced
Type: Book


There are also resources that offer subscriptions for their learning platforms

1. 365DataScience

365DataScience is a Data Science learning platform with an initial free tier to sample the course material. I’ve not used this resource personally, but they cover a range of topics in data science and have a free tier to give you a taster before you commit to the subscription.

Programming languages: Python, SQL
Level: Intermediate, Advanced
Type: Interactive Tutorials


2. Learn the basics with Codecademy

Codecademy requires a subscription to access the full course content and offers introductory and advanced courses to different programming languages. The content that is free to access has changed significantly over time. Whilst this was my go-to resource when I was first learning Python as I liked the interactive style of the courses, now with the platform, you can be mid-way through a chapter and are unable to progress unless you sign up.

Programming languages: Python, HTML, CSS, JavaScript + more
Level: Beginner, Intermediate
Type: Interactive Tutorials


3. DataQuest

If you’re already familiar with the basics in Python and are looking to apply your knowledge to concepts in data science, check out DataQuest. Like the previous two platforms, DataQuest also requires a subscription however they do offer a free trial so if you’re interested, give it a try!

Programming languages: Python, SQL, R
Level: Intermediate, Advanced
Type: Interactive Tutorials

Troubleshooting

One of the hardest parts when learning to code can be trying to work out what to search for when you’re stuck. This does get easier the more you practice! Here are a few common places where you might find the answers you are looking for:

1. StackOverflow

When searching for a programming question, the top results are usually from StackOverflow. Stackoverflow is an open community where people can ask questions and other developers try to help. Chances are, the problem you’re having, others have already asked on StackOverflow with possible solutions waiting for you!

2. DEV.to

DEV is a community of software developers getting together to help one another out. The platform supports collaboration and networked learning through articles, tutorials and discussions in addition to podcasts and videos shared by the development community! If you sign up, you too can share your coding journey and the things that you learn with the community and meet other people learning to code too!

3. Medium

Medium has a range of publications dedicated to learning to code. TowardsDataScience has many articles and tutorials on Data Science and Python, BetterProgramming and HackerNoon also have content around programming and you may also find company blogs such as Netflix Technology Blog who share technical articles and tutorials.

4. Data Science Stack Exchange

Similar to StackOverflow, Data Science Stack Exchange is a forum to ask technical questions, this time specific to Data Science and Machine Learning. When troubleshooting Python questions, this resource often appears in the top search results and is another site where the community may already have the answer you are looking for!

5. Twitter

There is a large tech community on Twitter. Many people join #100DaysOfCode, committing to tweet every day they code over the course of 100 days, sharing what they’ve been learning and supporting others in their journeys too. If you are stuck, you can also reach out to this community and someone may be able to answer your question or point you to something that could help!

6. Join a Python community

There are also global networks that host meetups and code nights all over the world. There are also many meetup groups focused on putting on technical talks, tutorials and events — check out Meetup or Eventbrite for events in your local area. It’s also worth considering online communities and groups with Slack channels, Telegram groups or virtual meetups where you can join to learn, share and network.

Installing your Python environment

You’ve read this far and have a number of resources to get you started, next, let’s get Python set up on your machine!

There are several different options when installing Python depending on which OS you are using and how you’d like to get set up. For new programmers, I’d recommend installing Anaconda which is quick to get started and available for Windows, MacOS and Linux.

Python 2 or Python 3?


Support for Python 2 was stopped on January 1st 2020. You may still find software written using Python 2 but I’d recommend installing/upgrading to Python 3 if possible!

What is Anaconda?


Anaconda is an open-source distribution of Python and R. This means that it installs all the necessary software and packages that you need to get started.
It includes:

  • the Python and R programming languages

  • pre-installed python packages

  • conda, a python package manager which enables you to easily install and update python packages. You may also see pip mentioned, conda is an alternative to pip.

  • Spyder is an Integrated Development Environment (or IDE, for short), which includes a text editor — think Microsoft Word but for writing code — in addition to tools for testing, debugging and inspecting your program and many features to making programming easier, including autocomplete!

  • *(Optional but recommended) PyCharm is an another IDE and you will be prompted on installation whether you’d like to install it alongside Anaconda. I’d recommend doing so! I much prefer PyCharm over Spyder, finding it easier to navigate and get started with.

  • Jupyter Lab/Jupyter Notebooks also can be installed through the Anaconda Navigator. These allow you to write code alongside text or visualisations and can be useful when presenting projects or going through tutorials.

If you already have a preferred IDE that is not included above, such as Sublime or Visual Studio Code, check out the Anaconda documentation to find out how to select Anaconda Python as your python interpreter within the IDE.

Python within your browser


You can also access Python within your browser by using Trinket where you can also set up an account if you want to save your code.

Other ways to install Python


If you’d prefer not to use Anaconda, you can download and install Python from the Python Software Foundation. If you’re using Linux or MacOS, you may already have Python pre-installed but this may not be Python 3. For further installation options, follow the instructions on RealPython.com.

What’s next?

So you’ve installed python, covered the basics and are feeling ready to get started with a project!

Here is a list of possible projects and challenges to give you some inspiration:

1. CodeWars

CodeWars has a number of coding katas, or challenges, where you can put your python skills to the test and compete to solve problems from beginner to incredibly advanced!

2. Project Euler

Feeling like a new challenge? Why not attempt the first 100 Project Euler problems using python. You can follow #ProjectEuler100 on Twitter and join the community to solve the challenges! I started the challenge at the start of 2020 with the aim to complete all 100 by the end of the year… entering the 5th month of the year, I’m way behind target!

3. Get started with a project

Check out Medium and DEV.to for tutorials you can follow to get started on your first project, or if you are looking to get started with a Data Science challenge, check out the Titanic Machine Learning challenge on Kaggle.

Watch this space for my next articles where I will walk through a project, exploring datasets, creating visualisations and providing you with the skills and tools to continue your coding journey.



Thank you for reading! If you enjoyed my article then subscribe to my monthly newsletter where you can get my latest articles and top resources delivered right to your inbox!

You can follow me on Medium for more articles, follow me on Twitter or find out more about what I’m up to on my website.

This article is also on Medium.

✨Subscribe to my Newsletter✨

Get the latest posts delivered right to your inbox

Avatar of Author

Kerry Parker

Data Scientist with PhD in Physics. Interested in learning, software development and productivity, see more posts on Medium.