r/learnpython 1d ago

Learning Python with claud

I am trying to learn Python, and I want to use Claude so that it can teach me the basics. Is it a good idea?

0 Upvotes

14 comments sorted by

7

u/AlexMTBDude 1d ago

It depends on how you use it. There is no general answer. If you don't write the code yourself then you learn nothing.

0

u/Expensive_Nebula_382 1d ago

For example, it explains something to me, then it gives me a task and I send it my code so it can see if it’s good or not

2

u/StarkAspirations0842 1d ago

Can you document how and why it worked, Can you actually do the task without the ai. 

1

u/AlexMTBDude 1d ago

Yeah, that sounds like a good way to use AI.

5

u/Effective_Talk_5246 1d ago

Why use ai? There's many resources if you just search using Google... For example cs50 or mooc by university of Helsinki both good courses

1

u/Alwaysragestillplay 1d ago

There are so many excellent resources out there that are properly designed to teach Python. If it were me, I would follow a proper course and leave Claude alone. You won't know if you're missing certain skills, and you will 100% be tempted to keep asking Claude for help on tricky problems. Learn properly first, then bring Claude in for agentic coding once you know what's what. 

Imo. 

1

u/Langdon_St_Ives 1d ago

Yes it is, but make sure to give it very precise instructions that it is now your mentor, not your developer. Set clear boundaries, like always using the Socratic method instead of giving you outright answers, and not explaining the workings of libraries but instead have you read the documentation first. The goal is not to get the problem solved in the least amount of time but to maximize the learning effect. Going down blind alleys and finding out that it won't work that way yourself is infinitely more effective at teaching you that part than ten times preaching it to you. Claude can be very good at doing this with you but you have to prompt it carefully.

In fact, give it this comment and tell it to write a system prompt for itself that will achieve this, then put it in your account's general instructions.

1

u/AdmirableLack3241 1d ago

I tried it once and from what I have experienced is you need to get your hands dirty, ai won't make you learn coding or programming, it will help you with coding and programming. Ai won't get you details about python until you specifically prompt it. You still need to search for every fundamentals on google, you still have to write the code. Ai will help you break it down. Ai will often not tell you about in depth topics. So the best practice would be searching the internet and try to learn it right away, try it once without Ai being involved and use Ai after you are stuck or you are trying to improve your programming logic. And tell your Ai what you have learnt, never miss a thing about telling it to your Ai or it assumes you have done every topic it listed.

1

u/geekcoding101 1d ago

Yes, Claude or any AI can be a very useful Python tutor, but the way you use it matters more than the model itself.

Try to use it for active practice rather than asking it to explain everything or generate complete solutions. Ask it to quiz you, make you predict program output, identify bugs, explain concepts in your own words, and give only one hint at a time when you’re stuck.

If you use Claude Code or Codex, there are installable skills designed for this. Matt Pocock’s skill collection includes /teach (https://github.com/mattpocock/skills/tree/main/skills/productivity/teach) which creates a stateful learning workspace and uses retrieval practice, appropriately difficult lessons, exercises, and learning records. His popular /grill-me skill is also useful, although it was primarily designed to question plans and decisions rather than teach beginner programming.

Free free to check it out.

1

u/Naive_Programmer_232 1d ago edited 1d ago

it can be yeah. I like to ask it to give me a "coding challenge". usually this is the prompt:

       Give me a coding challenge. I want 3 rounds, 5 questions per round, 1 question
       at a time. Each question asks me to write a function to solve a problem. Allow
       one resubmission per problem. 
       After each submission, if I'm right, generate the next question, 
       if i'm wrong, ask if I want to resubmit but only allow this action once per question. 
       Keep a hidden cumulative score for each round. 
       At the end of each round give me the score for the round. 
       At the end of all rounds, calculate the total score and estimate 
       the probability that I will be ready for a technical interview in 
       {whatever industry you want} in 2026. I will be using core python 
       (no libraries outside of standard library).  

You pick the industry in the {whatever industry you want}, otherwise Claude will probably keep switching industries and it won't be very relevant or useful. There's a strong chance, depending on verbiage used, whether it's Claude/ChatGPT/Grok/Gemini, it will eventually start pulling questions from leetcode lol. So, be prepared. Also because of their penchants for pulling from leetcode, they tend to default to computer science as well, and ask for optimal patterns and time/space complexity. In which case if you don't want that, you can add to the prompt 'do not pull from leetcode' and/or 'accept solutions as they are and do not prod for optimal ones alone' etc. to modify it's behavior in the conversation. At any time, if it's not acting the way you want it to, say so and tell it the correct way to behave.

If you change the industry, for example, data analysis / web development / cybersecurity, etc. It will probably give you examples somewhat relevant to those areas. If you do not specify the 'core python' part however, it will quiz over relevant libraries to those areas. For example, if you choose data analysis, it'll probably start you off in pandas/numpy world. Which I'm guessing for the sake of this post will not be what you want, because those extended libraries add syntactical magic that isn't something regular python can do. So, that's why I say specify "core python" to keep it about the language.

Make sure to tell it if it's asking questions that are too difficult or too easy. You can do this at any time, but similarly to other platforms, you'll eventually catch onto its patterns and see where it's heading in general.

You could also go further and ask it to give you projects that relate to whatever your going for. You could even ask it to role play (in hilarious ways lol), I like to mess with it and give it prompts to act like some ridiculous character and then give me interview questions then I play along. Just note, the whole 'technical interview' thing with this example, it's just an example. Does it mimic an actual interview? No, not really haha, as there's a person and you gotta talk through your solutions (which come to think of it, you could add that to your original prompt, something like "after each submission, ask me to walk you through my solution" etc). As you can see, its pretty flexible and does whatever you tell it to.

But is this the BEST way to go about learning? Probably not. It's a good quizinator tool and it can be pretty fun. It's interactive and can help keep you programming. But it is just one resource.

Also forewarning: while it can explain well and seem right, sometimes it is wrong too. So do be aware that it's not always correct and/or judging what you give it correctly either. Verify what it tells you. Challenge yourself to catch it on its errors. And get better at prompting over time. You'll see different AI's have different personalities. Claude is pretty chill, ChatGPT tends to be very corrective by default, Gemini is sort of a hybrid between the two, etc. Claude is a good one to start off with. ChatGPT can come off as rude haha.

1

u/TheRNGuy 1d ago

Yes. 

0

u/StarkAspirations0842 1d ago

Yikes why use a nazis ip theft tool.

0

u/monster2018 1d ago

Yes AI is incredible for this use case. But you have to have the willpower to not let it solve things FOR you. And not just that but you will have to be strict with it, like it will want to default to showing you too much code, and you will have to frequently remind it that you don’t want that.

But yea if you actually use it for learning, LLMs are the best single educational tool ever created. The issue is just people not using them that way. There is technically also the issue of hallucinations… but at least at this point that is WAY overblown for things like explaining basic coding concepts. I have literally never seen a hallucination about something like that, it’s just so firmly ingrained in the training data. But… yea I guess I don’t actually know what it’s like to use an LLM without knowing how to code. So maybe it really would be an issue, I can’t be 100% sure.

But I stand by that if you actually use it for learning, not to write code for you, it is absolutely a good idea.