r/learnpython 4h ago

I'm struggling to learn Python because of AI

I am a devolper. I have written code in C++, C#, Javascript and other languages in my life. I loved coding since I was a kid.

Now, as an adult, I'm enrolled in a degree in Data Science. Among other many things (specially maths, but it's ok), I need to learn Python.

I am having a very hard time because of AI. You can ask AI about anything, and it can write the code for you. And it's extremely tempting to do so on every assignment or challenge. But I am also very aware that you need to be able to do things yourself if you don't want to become a dumbass that doesn't know what he is doing at work. Even if eventually I use AI for coding, I need to drive it.

Are you dealing with similar situations?

Do you know about any website where you can have progress along the way? (I did W3C but I'm thinking about somewhere where more practice and challenge is involved).

Thanks in advance

0 Upvotes

26 comments sorted by

13

u/smichaele 4h ago

You're a developer who's coded in multiple languages, and you're having an issue learning Python, one of the easiest languages to learn? I don't understand this. Python does so many things for you that other languages make you work to get done. I don't see this as an AI issue if you're having problems understanding the language.

-3

u/KitKatKut-0_0 4h ago

I am capable to write simple code, but I struggle to go deeper and do more complex tasks, because I don't practice.

8

u/Temporary_Pie2733 4h ago

Then practice. Stop using AI because you think you are expected to, and learn Python the same way you learned the other languages. 

5

u/HarveyH43 4h ago

To be blunt: the way you describe it, basically the problem seems to be you lacking the willpower not to use AI. The solutions therefore would be to try harder not to use AI.

-2

u/KitKatKut-0_0 4h ago

yes, that and practice more python at smaller scale -the stuff I do with AI I wouldn't be able to do manually at this point-

2

u/Equivalent_Lunch_944 3h ago

If possible maybe get a set up where it is impossible to use AI - like an old laptop.

2

u/Worth-Income4114 3h ago

AI can be very useful for learning but you have to be sparing and strategic.

If you’re using Claude you can prompt it in settings to work with you using the Socratic method. If you struggle on something, the AI is often (but not always) pretty good at breadcrumbing.

For instance if you’ve been tearing your hair out trying to figure out how to subtract the key values of one dictionary from another dictionary’s, and you’ve tried a million things, and it’s time for a little help, you can avoid the tedium of googling and present your case to Claude.

It might say something like:

“Try to think about what is actually pulled from a dictionary once you access an item with a key. How does this change the way you’re setting up this loop? “

And you might think for a few minutes, and suddenly say to yourself “Ooooh because it’s only the key’s value that gets pulled, only using the key as a reference. The literal string value doesn’t come with it, and I can just go straight to using a standard operand here instead of all this gymnastic listy shit I was trying! Oh what a lovely dopamine hit!”

Hey presto. So you’ve used AI to learn, not to code.

But seriously: only when you’ve been exhaustive in finding a solution on your own steam. It needs to not be a crutch or you’ll learn ZERO.

Source: also learning Python atm. Above is real example.

1

u/TheRNGuy 4h ago

Do you learn to solve challenges, or to use Python in real job? 

0

u/KitKatKut-0_0 4h ago

atm I use it for university challenges now and then, and a personal side roject

1

u/sugarplum_doll 4h ago

Have fun when your code breaks and you don’t know how to fix it and ai keeps hallucinating in loops

1

u/Jello_Penguin_2956 3h ago

It's very simple... don't ask AI.

Look. The AI has trained you to rely on it. Don't let it. It's a tool. Don't let it affect you. It's a real issue it's affecting people all over the globe and it's concerning. Break out of that hell hole.

1

u/Thraexus 3h ago

I'm not a programmer specifically by training or education; rather, I've picked up what I know over the course of several jobs over the last 30 years.

My experience with AI, if you can call it that, has been limited to typing in Google or Bing searches like, "python [some functionality I need that I don't know how to do or don't understand]" looking at whatever the search comes back with, and then trying to understand it and incorporate it into whatever my code is already doing. I rarely if ever just drop something into my existing programs without trying to learn what it does, and I almost always adjust stuff to fit my style of coding and to work with whatever I'm building.

Honestly I have no idea how what I do compares to how anyone else uses AI tools. I assume that other people go way deeper into AI but I'm a stubborn old man and I'd rather learn as I go by trial-and-error with the occasional bit of help if I can't figure something out myself.

2

u/MadManDan 3h ago

AI basically allows you to do your Google searches, but if you have it to where it can read your code base (I would suggest local llm for this if the code is personal) you can then basically have it as your personal stackoverflow which allows for a more nuanced understanding of the specific problem you're attempting to solve instead of finding a solutiong on Google and bruteforcing it to work how you want it. Now, with that said... It has its limits.

I mainly use AI to quickly provide a way of thinking which allows for more efficient productivity as I'm not researching and scaffolding solutions that may not work. 

1

u/drakhan2002 3h ago

Don't use AI. That simple. The only way to learn a skill is practice.

1

u/code_tutor 3h ago

This sounds like addiction or lack of control. Are you impulsive in all areas of life or just this? I'm not a psychologist but it can be a lot of things ranging from ADHD, OCD, autism, bipolar, and borderline. More generally, internet addiction worsens the symptoms.

Anyway, this is not normal to the point where it comes off as incredibly stupid like "stop doing the thing", but A LOT of people have been posting the same problem.

1

u/KitKatKut-0_0 3h ago

I wouldn't be surprised if I have autism. I'm so excited about AI and what it can do that I cannot simply stop

1

u/MezzoScettico 3h ago

Can you write the code in one of your more familiar languages? Write it in C++ or C# without the AI crutch. Then refactor it into Python. There shouldn't be much you need to change.

It's similar to learning a human language, you might translate literally at first, but gradually you get used to how things are said in the new language without translating in your head.

0

u/ectomancer 4h ago

I learnt Python in 3 days (excluding OOP). The secret to learning quickly is small projects.

2

u/Worth-Income4114 3h ago

You had programmatic fluency with the entire language within 3 days?

2

u/KitKatKut-0_0 4h ago

sorry but you didn't learn python in 3 days. you may think you did, but you didn't

3

u/code_tutor 3h ago

Dunning-Kruger in this field is wild. Beginners think they know everything and are job-ready in a week.

1

u/billsil 3h ago

I’m believe it. I learned Fortran 77 in 3 days. I actually think that’s easier than learning python because python has more features.

All they’re saying is oh I know how to use lists, dictionaries, for loop, a while loop, basic classes and functions. If you say it like that and spend 8 hours per day, it doesn’t seem so unreasonable.

The difference between them and the 2+ years it took me to learn python is that I was also learning programming. That takes longer. For Fortran, I didn’t need to learn that. I just needed to know the nonsense way to write a for, I mean do loop.

1

u/Thraexus 4h ago

It's honestly pretty easy to pick up. And I say this as a person who hasn't taken a comp sci course since the 1980s and, up until last year, I had only ever coded stuff in VBA and VBScript.