DEV Community

Cover image for Mastering Python the Right Way
Brayan Kai
Brayan Kai

Posted on • Updated on

Mastering Python the Right Way

Introduction

So, what exactly is it? Why is it so well-known that everyone seems to be talking about it? What was the source of it? What is the best way to learn Python? Why should I bother learning it at all?

Before we started programming, we all had those questions, which is why I chose to write this post to assist you get started with Python the right way. Study like a pro and learn what to do next after you've finished.

As a beginner, you should be able to start into studying Python after reading this article and make the most out of your learning. As an expert, you should be able to delve deeper into the language and enhance production thanks to the newfound vigor.

So let's get started.

What is Python

Because this is the topic at hand, we must first get to know what Python is.

In simple words, python is like a fork that is used to eat, yet the same name can also be applied to a fork that is used in cooking and even in kitchen gardening. Everyone holds a fork differently while eating, although it accomplishes the same duty, and people eat different foods with the same equipment, the fork.

Python is as well a tool that we utilize to address various difficulties.
By creating a website to advertise their items, one can utilize Python to tackle the problem of a lack of clients in their business.
Another option is to utilize Python to construct a data analysis program to handle the problem of unpredictability in taxi scheduling in a city.

Python can also be utilized in a variety of settings. Whether you're using Mac OS, Linux, or Windows, we've got you covered. That is only a sliver of Python's true potential.

So we can declare that Python is the fastest-growing programming language in the world, not just for software engineers, but also for mathematicians, linguists, data analysts, network engineers, accountants, and even children.

Why Python

It's daunting to see how quickly everyone is talking about Python, and it should be.

Guido van Rossum, Python's founder, had a clear aim for the language: "make it as simple to grasp as plain English."

In retrospect, this may have been a bit overconfident. Python, on the other hand, strives to emphasize readability and the usage of large white spaces.
To put it another way, it aims to be as near to human language as feasible.
Python's dynamic type nature makes it easy to understand even for those without a technical background, so it's no surprise that it didn't take long for people to fall in love with it.

Python can handle complicated problems in less time and with fewer lines of code than other programming languages. Let's say you wish to print the first two letters of the word "Lux Academy."

In C# str.Substring(0, 3)
In JavaScript str.substr(0, 3)
In Python str[0:3]

See how concise and clear the language is? That's only the beginning, Python simplifies a lot of trivial tasks with its basic yet strong syntax.

  • Python is a high-level language, so unlike other languages like C#, you don't have to worry about things like memory management.

  • Python is a cross-platform programming language that can be built and run on Windows, Mac OS, and Linux.

  • Python has a sizable user base. There is always someone willing to assist you whenever you wish to begin studying. I've only shared a few, including @lux academy, @DSEAfrica, and @andela alc.

  • Python has a broad library, framework, and tool ecosystem. So whatever you want to do, someone has already done it, and even more are waiting to assist you. It's been around for over 20 years, so you can imagine the wealth of information available.

Consider learning python in the same manner you would learn a spoken language: there is always more to learn and no end in sight. However, if you continue to practice, you will eventually recognize that you have attained your aim.

So, let's dive in and explore how to learn Python the best way possible. What you can do to learn to grasp and comprehend what you're feeding your brain.
That you can use Python to envision a solution to even the most basic difficulty you encounter in your daily life.

Getting started with Python the proper way.

Psychology says, train yourself to stop waiting for the "right time".

What are the prerequisites for learning Python?

Accepting the challenge and wearing tenacity with a growth mentality are required to learn Python.

You must be willing to learn new things. That is exactly what you require.
As I write this post to you, I do not have access to a computer of my own. But it's never stopped me from learning, writing and coding.

That public computer at school could help you become the person you've always wanted to be.
Your auntie's PC could be the source of the next-generation AI expert.

Here are my own recommendations for getting started and getting the most out of your learning experience.

Begin right now!

1. Find out what makes you want to learn Python.

Learning Python is not easy, and if you don't have a driving force to keep you pedaling toward your ultimate objective, it'll be easy to give up.
Have something that inspires you to continue learning Python.
For example, make that reason particular and project-based.

"I want to learn Python and design a model that can save young African girls from fistula through early identification and treatment."

Python can be used for a variety of tasks, including data science, game development, web development, and CAD, to name a few. All of these necessitate distinct resources. As a result, knowing what you want to accomplish with Python makes your job much easier.

Set a clear and S.M.A.R.T. goal for yourself.
Narrow down what you won't learn, so you may work in little increments, checking off your accomplishment boxes and enjoying your modest victories with each step climbed.

It is never a good idea to set money as a goal.

Set goals and chase them with passion ..if only you want it you can get it ..just don’t make money your only goal in life ..you will lose your soul and stop living life. Understand money is only a tool and not your score in life you can get happiness from following your passion

As you develop the python code, keep a passionate aim in mind. Make an effort to make a difference in someone's life.

"The human is more important than the technology. Make things more human" - Steve Wozniak

2. Learn how to use Python's basic syntax.

Start learning basic python syntax with the energy burning within you to achieve your well-stated goal. The goal is to learn as much as possible in as little time as feasible.
You don't have to learn everything or become a python syntax aficionado; all you need to know is enough to go on to the next phase.

Your aim should be to get through the fundamentals as quickly as possible and then move on to projects.
Make sure you learn by doing, and that you put what you've learned into practice. If you prefer to learn from a textbook or a video, my advice is to attempt to practice as you learn rather than just ingesting what you learn.

Regardless of where you are learning, strive to experiment with concepts and venture outside of your classroom. Have an inquisitive mindset.
Remember to concentrate on learning and practicing the syntax rather than taking copious notes.

3. Begin constructing well-structured projects.

Python is now second nature to you. Begin focusing on structured projects that are aligned with your goals. Working on projects is a lot of fun and beneficial.
They'll assist you in gaining real-world experience as you put what you've studied into practice. By taking on new challenges, one can even learn new things.

Choose a project with a tutorial to work on and get started. Choose something intriguing to work on that will keep you motivated.

If you want to study python for data science, for example, once you've mastered the basics, look for a course or a data set that interests you, or grab your own data and start working with it.

This procedure can be difficult and discouraging at times, but if you enjoy what you're doing, you'll be lot more inclined to stick with it

4. Start working on your project right away.

Break away from the structure of a tutorial in this phase and start working on your project. This will be a challenge, but one that will force you to learn.
If your project idea appears to be too difficult, consider breaking it down into smaller chunks. Take a step-by-step approach to it.

Let's imagine you're a campus student who has a hard time deciding what food to prepare for yourself. So you decide to work on a project that will evaluate your favorite foods and recommend what to cook for yourself, provided that all of the items needed to produce the dish are in your refrigerator and the meal is a well-balanced meal.

So you might start by making a dictionary to keep track of all the ingredients you have in your fridge. Then develop it to the point where it can predict what you want to eat based on your behavior with food before and your taste, then declare the meal and supply a healthy recipe for you.

Remember that using Google is not a sign of failure. You've learned something new every time you've run into a challenge and had to hunt for a solution.
The dirty little secret about programming is that everyone searches for answers on Google all of the time.

5. As you gain experience, make your project more complex.

When you're able to complete your project, you'll be more motivated to go even further.
To keep improving, you must increase the challenge of your projects. This can be accomplished by creating a new project or adding complexity to an existing one.

Another excellent method is to attempt to write a tutorial for the project you are currently working on. Teaching others why and how your project works can be a very effective learning approach. This, though, can be difficult, yet we are made of more.

In a simple question format, here are some recommendations on how to scale up your project and approach this stage:

  • Is it possible to make your code more efficient or faster?

For example, in the code for my Meal Selector project, I can choose to utilize tuples instead of lists as much as possible. In a programming, tuples are more efficient.

  • Can you make it more accessible to a wider audience?

Can I, for example, make my meal selector project understand my family's eating habits at home? As a result, it will be able to choose a meal that everyone in the family will enjoys.
Can it choose different meals for family members with varying nutritional needs, such as a breastfeeding mother, a baby in the weaning period, or a sick family member? While not meddling with the other family members' choices.

  • Can you transform it into a product by making it production-ready?

Can I, for example, commercialize my Meal Selector Project so that it can learn diverse eating patterns of office workers and select a noon meal for everyone? And you'll get compensated for it.

  • Is it possible to make it more self-contained by removing some of the external dependencies?

Is it possible for you to design your own project module? That way, you'll be able to cater to your code's unique requirements, removing some of the dependencies.

I believe you can become a solution to a problem in your society by following the above-personalized guide and being honest with yourself.
A Pythonista with a legacy that will be passed down through the generations.

Here are some resources to help you learn Python.

Websites
Free Code Camp
Udemy
Real Python
Code Academy
Skill Share
Coursera
Learn Python
Data Camp

Conclusion

I appreciate you 🤗 taking the time to read this post, and I hope you learned a lot from it and were influenced to greater heights as a result.
I'd appreciate it if you could leave a comment below.😘

You can contact me via Twitter, and I'll be happy to respond.

Top comments (13)

Collapse
 
tonypelliccio profile image
Tony Pellicccio

I picked up python skills from a place I once worked. Came in handy when Microsoft pushed an update to Windows 10 that borked timer functionality. Had python installed an so a couple lines of python recreated a timer.

Collapse
 
hannahmwende profile image
HannahMwende

This is amazing!!

Collapse
 
brayan_kai profile image
Brayan Kai

Thanks very much @hannahmwende . Trusting it was helpful to you in a way

Collapse
 
felix715 profile image
felix715

Nice article....why don't you include maybe how a beginner may get started with python

Collapse
 
brayan_kai profile image
Brayan Kai

@felix715 could you please share with me your Twitter handle. I will be glad if you did.

Collapse
 
brayan_kai profile image
Brayan Kai

Noted @felix715 . It will be intergrated soon. Really glad you took time to read this

Collapse
 
chris00walker profile image
Christopher Walker

Great article - mindset before skillset.

Collapse
 
brayan_kai profile image
Brayan Kai

Exactly @chris00walker , get the mind read y for the incomming skills.

Collapse
 
sheriff67685105 profile image
Sheriffdeen Adegoke Muritala

I learned a lot. I learned about the website to get started with python. Thanks for sharing this.

Collapse
 
aryan1113 profile image
Aryan Pandey • Edited

Great article ! The meal-selector example was quite innovative

Collapse
 
brayan_kai profile image
Brayan Kai

Thank you very much🤗 @aryan1113 , I really appreciate you for taking your time to read this 👏🤩

Collapse
 
brayan_kai profile image
Brayan Kai

Thank you very much @hseritt . Really appreciate your time to read the post