Python-bloggers

How to Learn Python

This article was first published on DataCamp Community - python , and kindly contributed to python-bloggers. (You can report issue about the content on this page here)
Want to share your content on python-bloggers? click here.

Python is the most popular programming language today and is widely used across verticals from software and web development, game development, data science, machine learning, and more. Learning Python is imperative for aspiring data scientists, data analysts, data engineers, and machine learning scientists.

The good news is that a complete beginner can learn and start programming in Python in just a couple of weeks. Here’s how to get started.

Know your motivation before you begin

Python is a highly versatile programming language with many use cases. It’s important to have a specific motivation in mind as you embark on your Python learning journey. Targeting an area of interest will help you get started quicker and filter out learning resources that don’t fit your use case. My own Python learning journey began when I needed to use it for school for data science projects. I had no Python or programming experience and needed to get up to speed fast. Luckily, with a few online resources, I was able to become proficient in just a few months. Here’s a list of relevant areas where Python is helpful:


1. Data Science and Machine Learning

Python’s rise in popularity can be attributed to its rich set of packages and tools for data science and machine learning. Researchers use data analysis packages like pandas to analyze Covid data, practitioners can quickly apply machine learning with libraries like scikit-learn, Keras, and PyTorch to detect fraud, classify images, and produce product recommendations.

2. Desktop and Mobile Software Development

Whether building simple software applications like calculators, or more complex ones like document editors and social networks. Python offers a plethora of tools to prototype, develop, and run desktop or mobile applications such as wxWidgets and Kivy.

3. Web Development

Did you know that web applications like Uber, Netflix, and Spotify were built with Python? There are a variety of web frameworks on Python that simplify website development. Packages such as Flask, Django, Bottle, and Pyramid all offer tools to quickly prototype and build scalable web apps.

4. Game Development

This may come as a surprise, but games such as The Sims 4 and Civilization IV were built with Python. Python libraries such as PyGame and Turtle simplify prototyping and development of games.

5. Internet of Things (IoT)

The rise of embedded systems and the internet of things (IoT) has catalyzed innovation and business process improvement across domains. Python offers a set of packages that make it easy to design, create, and deploy an IoT device on Arduino, Raspberry Pi, and other IoT devices such as Alexa and Google Home.

6 steps for your Python learning journey


1. Spend as little time as possible on basic syntax

When learning any programming language, it’s very easy to get bogged down by learning syntax. Introductory courses often make learning a chore by focusing on pure Python syntax rather than how Python can solve a specific problem. Don’t get me wrong: Learning Python syntax is essential for any beginner Python learner, but as a rule of thumb, you should learn just enough syntax to get started working on simple projects. When I began my Python journey for data science, I learned just enough syntax to be able to use pandas for simple data analysis tasks. Here’s a list of syntax resources:

2. Set up your Python environment

Before working on projects, you need to have a Python environment set up on your machine. Being able to work on projects on your own machine is the best way to apply your new skills. To set up your environment for data science, I recommend installing an Anaconda distribution, which conveniently installs all relevant data science packages, and an integrated development environment for editing code in Python called Spyder.

For a primer on setting up your Python environment with an Anaconda, watch my hands-on training for a step-by-step tutorial. You can also follow beginner guides for installing Anaconda on Windows and Mac OS X.

An image of the Spyder Integrated Development Environment

3. Learn by doing

At DataCamp, we believe that learning by doing is the best way to learn and apply programming skills. No matter your focus area, working on projects will help you get out of your comfort zone, learn how to debug and read documentation, and showcase your skills to potential employers.

Data Science and Machine Learning

Data Science and Machine Learning is one of the fastest-growing focus areas today. There are many solutions for online data skills training:

Desktop and Mobile Software Development

Python offers a range of tools to prototype and develop desktop and mobile applications. Here’s a list of learning resources to get you started:

Web Development

The two main packages for Python web development are Flask and Django. While there is discussion on the pros and cons of each, here’s a list of learning resources for both packages:

Game Development

While modern game development is dominated by game engines like Unreal Engine and Unity where most developers use JavaScript, C#, C++ or Java, the following python packages are a great way to get into game development:

Internet of Things (IoT)

IoT devices are everywhere around us, collecting data about our environment and are only expected to rise in numbers, here’s a list of resources covering how to program IoT devices with Python:

4. Learn how to debug code and ask for help

One of the most overlooked skills any aspiring programmer needs to hone is debugging. Every Python practitioner, regardless of skill level, faces errors and problems with their code. When you encounter with errors in your code, make sure to use these resources at your disposal:

5. Expand your learning resources

Now that you’ve set up your Python environment, worked on guided projects, and learned how to debug, it’s time to expand your knowledge and continuously sharpen your skills. Here are a list of resources that will help you do that:

6. Build a portfolio of projects

Now you’re ready to start tackling complex open-ended projects and showcase them in a portfolio for future employers. When working on open-ended projects, it’s best to start simple and work on Python projects directly related to your work. If you’re looking for inspiration, this Edureka blog post contains a list of open-ended projects in game development, web development, data science and machine learning.

You can start building your portfolio by hosting your code on Github and writing blog posts about your projects. This gives you the ability to showcase your technical writing ability and teach beginners how you’ve developed your projects. You can write blog posts by developing your own website or by using a blog hosting service like Medium.

I hope you feel inspired by this blog post, and that these resources are useful to you. Mastering any programming language is a lifelong learning journey—one that I am still on myself. At DataCamp, Python is part of our core curriculum and we’re constantly improving and adding to our content. Lastly, I invite you to join thousands of learners in the DataCamp Slack Community to get support on your Python journey!

Adel Nehme is a Data Science Evangelist at DataCamp. He was previously a Content Developer where he collaborated with instructors on a range of Python courses, and created our course Cleaning Data in Python.

To leave a comment for the author, please follow the link and comment on their blog: DataCamp Community - python .

Want to share your content on python-bloggers? click here.
Exit mobile version