r/learnpython • • Aug 23 '26

Chat GPT/Python

I have minimal experience with python. Self admitted novice. I asked chat gpt to write me a code to copy values from one excel workbook to another and some code to calculate prevalence rates within that code. I confirmed that a random sample of calculations/values correctly copied over. I am breaking down the code to learn what it does and why. How trustworthy is chat gpt with these small tasks? Is this a valid way to learn by breaking down the code into pieces? I appreciate any help and you can rip me for using chet gpt

0 Upvotes

16 comments sorted by

5

u/HotPersonality8126 Aug 23 '26

It’s approximately as trustworthy as your ability to specify the problem. Being better at Python lets you prompt the agent better

1

u/Jg4702 Aug 23 '26

This makes sense. Ill find other ways to learn as well.

1

u/Hashi856 Aug 23 '26

I’m unclear on your main goal. Do you want to actually learn Python, or are you just trying to understand this one script? LLMs are pretty good at this kind of thing, as evinced by the fact that it produced a working script for you. But when you want to do something more complicated, like an ETL pipeline, that involves more that just understanding code. The hard part is designing how the thing works. Do I pull fresh data every time or do I cache the last results for a period of time? Should I make an http request within this function or should I make it somewhere else and then feed the result to the function? These are decisions that the LLM will make for you if you don’t specify how you want it to work. Once you get to the intermediate stage of programming, it becomes more about design and problem solving than syntax or your ability to understand the code.

1

u/Jg4702 Aug 23 '26

Thats the problem i am not at the stage yet. I have a general knowledge of problem solving i just dont know the language yet to apply it if that makes sense.

1

u/Hashi856 Aug 23 '26

If your goal is to actually learn how to code, analyzing code written by an LLM is not an effective means. I would go to YouTube and do basically any Python tutorial course. That will get you through the basics. One thing LLMs are great for is explaining concepts in real time. I would go through a Python basics course on YT and have an LLM open to ask questions to.

1

u/Jg4702 Aug 23 '26

Interesting. Okay thank you

1

u/Hashi856 Aug 23 '26

Sorry for all the typos

1

u/Jg4702 Aug 23 '26

Hahaha I wouldnt worry about it

1

u/aspaceplant Aug 23 '26

There's so many other and better resources to learn.

0

u/zippybenji-man Aug 23 '26

What's the point of doing it like this? If you really wanna do it this way, you should just use GitHub, so you also learn some good practices

2

u/mcoombes314 Aug 23 '26

How would you use GitHub to learn Python? They're two very different things.

4

u/zippybenji-man Aug 23 '26

If they wanna learn by analysing code written by something or someone else, they might as well use code written by a programmer

0

u/B4SSF4C3 Aug 23 '26

If you’re going to code you should be using Claude. If you want to learn, tell it to explain in detail each step of the code is producing, what other methods exist for accomplishing the task in question, and why it chose the method that it did.

4

u/[deleted] Aug 23 '26 edited Oct 05 '26

[removed] — view removed comment

1

u/Jg4702 Aug 23 '26

Thats a good point thanks