How to Learn Python Basics With ChatGPT


It’s 2024, so I shouldn’t need to tell you why you ought to learn Python if you’re thinking about doing any kind of coding job. It’s one of the most popular programming languages, almost every data science job loves to see it on your resume, and it’s one of the easiest languages to learn.

The problem is that Python is a victim of its own popularity. So many people know Python, and it has such a reputation for being such a simple language that people forget that you’re still learning a coding language at the end of the day. It’s easier, relative to, say, Perl, but not easy.

It doesn’t help that many of the established learning paths have real flaws. Bootcamps are popular, but they’re often prohibitively expensive and time-consuming. Video tutorials are free, but quality varies and they’re not very motivational.

ChatGPT is a good way to learn the basics of Python as an alternative to the methods I mentioned above. It has a lot going for it:

  • It’s free (or $20/month at most)
  • Since it was trained on a ton of Python data, it has a lot of Python knowledge
  • It’s good for many different levels of learning
  • You can go at your own pace.

It’s not without its flaws, but if you’ve tried and struggled other ways, this one could be worth a go. Here’s how ChatGPT can teach you Python basics.



Here’s a simple way to get ChatGPT to be your personal Python tutor.


How to Learn Python Basics With ChatGPT


Entry Quiz


You can start by giving ChatGPT an idea of your learning level. Ask it to do a quiz and assign you a level based on your responses. Based on those answers, get it to design a lesson plan for a specific time frame – say, a year or six months.

This is so great because unlike Coursera videos, bootcamps, or YouTube lectures, this lesson plan can be designed to your specific level of Python. Skip the essentials if you learned them in high school or college, or ask it to really drill you on the core ideas if Python is brand new to you.


How to Learn Python Basics With ChatGPT


Lesson Plans


ChatGPT can then create lesson plans and help you progress through concepts. It can tailor the lesson plans based on your schedule.

Then, every day, come back to ChatGPT and ask it to walk you through the lesson plan. Based on your preferences, you can have it start with a test to see how well you retained yesterday’s material, or go straight into that day’s lessons and practice questions.

This is great for engagement. Text-based lessons, obviously, are not the most exciting things in the world. But when ChatGPT sets you a test question, you then answer it – and it will tell you if you got it right or wrong.


Course Corrections


Keep following your lesson plan, and see how well it works for you. Too fast? Ask ChatGPT to slow down. Getting bored? AskChatGPT to mix it up. Worried you’re forgetting previous lessons? Get ChatGPT to amend your lesson plan to include test questions from earlier on in your learning journey.



ChatGPT’s main selling point here is its personalization potential. As I mentioned earlier, you can tell ChatGPT to run this anyway you like:

  • Go faster or slower
  • Skip certain topics, or go deep on others
  • Go more text or more practice questions
  • Switch up the order 


Engaged Learning


Another advantage is the engagement level. Video lectures can’t tell you your code is wrong, but ChatGPT can. It can also teach you why. One thing I love about ChatGPT-based lesson plans is that you can ask it to use the Socratic method of teaching, which is extremely interactive, engaging, and good at getting you to grasp new concepts. For example, you might get something wrong in one of your ChatGPT-administered tests. Instead of telling you the right answer, ChatGPT can walk you through how to get to the right answer using Socratic teaching.




You can also get personalized project ideas based on your interests, skill level, and what Python concept you’re trying to learn at the moment. Plus it can guide you through the project, helping you out if you run into tricky spots.


Plugin Potential


Finally, ChatGPT Pro also offers teaching plugins like Tutory that are highly recommended by Reddit users. Tutory takes it a step further with session continuity and long-term memory, so ChatGPT will be better at sticking to a real lesson plan over time. More and more ChatGPT users are creating plugins, so if you’re on the pro version, keep your eyes open for other potentially useful plugins.



I would be remiss if I hyped up ChatGPT as a personal Python tutor if I didn’t also mention the things you should watch out for if you’re using ChatGPT.


External Environment


First, you’ll need to use an external Python environment for practicing and executing code. While you can write code inside ChatGPT, and it will tell you if it would work in theory, I don’t recommend it. It’s always better to run your code to see if it actually works as you expect. Plus, ChatGPT can’t fully replicate the experience of working on larger, real-world projects.


No Context


ChatGPT won’t always understand the full context or intention behind your code, either, especially if there are complex issues or bugs. Basic issues are not a problem, but the more edge-case your issue, the less likely it is that ChatGPT can help.


No Visual Aids


Unlike video tutorials, vanilla ChatGPT lacks visual aids like diagrams or charts. (Though some plugins like do grant it this ability.) Plus, as most people know by now, ChatGPT’s training includes information only up to a certain point. Python doesn’t evolve super quickly, but it’s still possible ChatGPT could be missing context, especially for newer libraries.


Fact-Checking Needed


It’s also worth remembering that ChatGPT might misinterpret your questions or provide overly broad answers. It’s also sometimes just plain wrong – it’s good to fact-check every so often to make sure you’re not going off-kilter.


AI Can’t Do Your Job


My most important caveat is that you should carefully watch yourself. There’s a risk of becoming too reliant on ChatGPT for answers, which can slow your independent problem-solving skills. While employers love your Python knowledge, problem-solving skills are more important.

Check out this article to know the coding tasks that ChatGPT can’t do.



Ultimately, ChatGPT is a great learning option, especially if you’ve struggled with other learning routes. If it works well to teach you Python basics, you can go on to use it to learn other skills, too.

That being said, it’s not without flaws. It also can’t take you all the way. I would trust ChatGPT to teach Python basics, but being able to demonstrate a portfolio of real-world projects is super important, too, and you’ll be on your own for a lot of that.

I’d recommend giving it a try. At worst, you’ll lose twenty bucks and some time. At best, you might be on your way to learning one of the most popular coding languages in 2024.

Nate Rosidi is a data scientist and in product strategy. He’s also an adjunct professor teaching analytics, and is the founder of StrataScratch, a platform helping data scientists prepare for their interviews with real interview questions from top companies. Connect with him on Twitter: StrataScratch or LinkedIn.

Leave a Reply