How to Start Learning Python
Tags: python, programming, beginners, tutorial
Published: 2023-11-05 16:00:57

If you are thinking about learning Python, then this article is for you.

## Why You Should Learn Python
Learning Python is a smart thing to do for various reasons:

### Versatility and Popularity

Python is a widely used, versatile programming language that is applicable in diverse domains such as web development, data analysis, artificial intelligence, machine learning, scientific computing, automation, and more.

It's also one of the most popular languages out there these days, so it's a smart programming language to learn.

Many job positions across different industries require Python skills. So learning Python increases your employability and job market competitiveness.


### Data Analysis and Visualization


Python has a robust ecosystem of libraries and tools (like Pandas, NumPy, Matplotlib, and Seaborn) for data analysis and visualization. These skills are in high demand as businesses increasingly rely on data-driven insights.

### Machine Learning and AI

Python is a preferred language for machine learning and artificial intelligence due to libraries like TensorFlow, PyTorch, and scikit-learn. Understanding Python is essential for anyone interested in these rapidly evolving fields.

### Web Development

Python has frameworks like Django and Flask that simplify web development, making it a great choice for both beginners and experienced developers looking to build web applications.


### Automation and Scripting

Python's simplicity and readability make it an excellent choice for automating tasks and writing scripts. It can be used to automate repetitive tasks, saving time and effort.

### Community and Support
Python has a vast and active community. While you're learning it, you'll have access to a wealth of tutorials, documentation, and forums which makes it easier to learn and solve problems.


### Easy to Learn

Python is known for its clear and readable syntax, making it easier for beginners to learn and understand basic programming concepts.

### Problem-Solving Skills

Learning Python teaches you essential problem-solving and algorithmic thinking skills that are transferable to other programming languages and domains.

### Future-Proofing

As technology advances, Python remains at the forefront of emerging trends due to its adaptability and continuous development.

As you can see, learning Python can equip you with essential skills needed in various industries. It'll also enhance your career prospects, and enable you to contribute to current and future technological advancements.

## How to Write Your First Python Code 🙌


When we start learning any programming language, we begin by writing "Hello World" in the terminal.


This is very easy, and it gives us the pleasure of doing something in a programming language, even if we've just started learning that language.

So we're going to do this in Python – but first, I would like to explain some prerequisites that you'll need on your computer.


### How to install Python on your machine

There are many ways to code on your computer, or even on your phone – I'm not joking!

Nowadays, it is very easy to code even from your smartphone or a tablet, as there are a ton of websites that help you write, debug, and run your code directly from a browser.


If you think that your computer/device might not be good enough for installing the programming software locally, then you can easily use any cloud-based popular platforms. Among these, GitHub Codespace and Replit are my favorites. You can check them out too:



![GitHub Codespace](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bkvy699rkip14knv6y62.png)


![Replit](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ysn2isayjgbxjzrzg602.png)





If you want to set up Python locally on your machine, then you are in luck because there are a ton of resources widely available on the internet to guide you through.



I have also written an depth article to show you the whole process step by step. You can read that article directly from here if you'd like. I also included a video tutorial to help you out.


If you are a Linux user, then Python already comes pre-installed. You can check whether you have Python installed on your system by using the command `python3 --version` also.

And if you are a Mac user, then you can check out this guide to help you get Python installed and make sure you have the latest version.

There are various ways to write Python code on your local machine. You can use Notepad, Notepad++, Sublime Text, VS Code, or any other text editor. You can also use IDEs like PyCharm.

I will use VS Code for this article. If you're doing the same, you'll want to install the [Python extension in VS Code](https://code.visualstudio.com/docs/languages/python).


We will install more extensions later if we need them.


## How to Create a Python File

If we want to create a file for writing Python code, we have to ensure that we add the `.py` as the extension to the file name.

When you're naming your file, there are a few things to keep in mind. For example, you can add spaces between two words in the file name, but that is not recommended. Instead, you can either use an underscore ( `_` ), use camel case ( `firstName` ), or use the snake case ( `first_name` ) to better handle spaces.

For now, I am creating a file named `Main.py`. In that file, I'll write my first Python code:

```python
print("Hello World")
```

This prints the string in the terminal:

> Hello World

We use the print function whenever we want to print something in the terminal. We use single quotes or double quotes in the print function, and we write whatever we want to print in the terminal within the quotes.


This also gives the exact output.

> Hello World

Just keep in mind that there are certain scenarios when we should use single quotes and double quotes. But you don't need to worry about that right now – you can learn those later.

Just note that you can't mix the two types of quotes in a single print statement. If you are using single quotes at the start, for example, then make sure you use single quotes for the end. The same thing is applicable in the case of double quotes as well.

## Video Walkthrough

[I have started a complete Python playlist to teach you Python from basic to advanced](https://www.youtube.com/playlist?list=PL7ZCWbO2Dbl5S2SlRcfKNk2x6njQrHMTt). As I am currently a final year computer science student in the Machine Learning major, and I am also researching Machine Learning, Artificial Intelligence, and Neural Networks along with some relevant technologies. This also helps me to keep my knowledge fresh and updated continuously.


The first video from that specific playlist demonstrates everything I have told you up until now. Make sure to watch the video here:

{% embed https://youtu.be/1g0pWjJWW4M %}

## Conclusion

Thank you for reading the entire article.

If you have any questions please let me know by reaching out on [Twitter](https://twitter.com/Fahim_FBA) or [LinkedIn](https://www.linkedin.com/in/fahimfba/).

You can also follow me on:🎁GitHub: [FahimFBA](https://github.com/FahimFBA)🎁YouTube: [@FahimAmin](https://www.youtube.com/@FahimAmin?sub_confirmation=1).

If you are interested then you can also check my website: [https://fahimbinamin.com/](https://fahimbinamin.com/)

Happy Coding! 😊