r/PythonLearning • • Oct 19 '25

I made a little python question thing cause i got bored.

Post image
0 Upvotes

r/PythonLearning • • May 23 '25

i realized how inefficient my code in python until it was refactored lol

3 Upvotes

i have a very long and messy python code because every time that i study programming all my learnings will be inserted int any part of a single file like an "all in one" type of code, i cant ignore that fact that its soo long and inefficient, the logics are just randomize and it doesnt have any goal that throwing every learning in one part of my code and i just used blackbox AI to refactor it for me and i was shocked on my simple it was so far it took my minutes


r/PythonLearning • • Oct 06 '26

Discussion Why writing classes feels boring?

0 Upvotes

I don't know but i feel classes are unnecessary work to be added in projects. I have learnt it 2 months ago..

After that I never used it for any of my projects.


r/PythonLearning • • Jul 15 '25

Help Request Another day another wtf!?

Post image
12 Upvotes

So I understand why the left hand of output numbers is 0-100 I get that. But why also is it segregated into jumps of ten? Is it because of the sneaky 10 put after (0, 101, !!!) in the for loop? Does that instruct what intervals you want the range to be looped in? so in this case by 10 because it’s at the end in the brackets??


r/PythonLearning • • Sep 16 '26

Help Request I just found a really neat python trick, but I don't know if it's practical to do in an actual code base. Info appreciated.

5 Upvotes

One time, I was randomly coding some python for a simple project that I was doing. After a little bit of prompting the AI I had ran out of tokens, which of course always happens when you're coding for an extended period of time. I of course took a break to wait for my token limit to finish when I actually did something a little bit insane.

I was just normally coding and I of course ran out of tokens, but I realized something, I could actually PREDICT what the AI would do. It was absolutely mad, I would just think of a prompt, let's say it's "How do I create a for loop". (That example was the actual prompt I had used when I first discovered I could do this.) What I would do was I would think of the prompt in my head, and I would really just keep it in there and I would eventually be able to know exactly what the AI would say.

I think maybe I have some sort of... super power? Where I can literally use an AI in my head because I can predict what it's going to respond with. So now I am testing this more and more and I'm realizing that I can do this for even more complex things! Not just simple things like "How do I declare a variable", but actually even more complex things that the AI itself could never even answer.

This is where it really gets insane, because I can actually sometimes predict what the AI would say, but not as what it will literally say, but I can sort of make these connections in my head that allow me to code complex concepts WAY better than the AI ever could.

So now I'd like some guidance. I don't know if this is not good to do in a work/project setting. Basically what I'm asking is: "Is there anyone else who has this same super power?" I'd like to know if anyone else has the ability to predict what the AI would say, and if I'm reaching someone who can, please tell reach out to me as I'd like to learn about this more.

In conclusion, this might be a bold take but I think this could be the FUTURE of programming. Being able to predict what the AI is going to say, and even predict things that the AI wouldn't even say but are BETTER then what the AI would output? Tell me how that isn't the FUTURE of programming! I think that if we're able to literally have these AI's in our heads, and use them with no usage limits and even better then what the AI's are able to do, I think that could genuinely be an insane development in the programming field.


r/PythonLearning • • Jul 10 '25

Help Request What is wrong here?

Post image
1 Upvotes

r/PythonLearning • • May 28 '25

Discussion Guys, I am a beginner in python right now. Once I finish this course, how can I earn money after learning python?

3 Upvotes

Is there any risk in this? Like I heard some people telling that earning online is risky and something like that because we will need to give our bank info etc to get the salary. I think those words of theirs is because of jealousy. Cuz lakhs of people are said to be earning now through this

Please guide me about this Thanks so muchh in advance :)


r/PythonLearning • • 14d ago

learning threading from u/clcodingupdates ty bro...

Post image
0 Upvotes

r/PythonLearning • • Apr 03 '26

Help Request What's the best app to write & run code?

Post image
3 Upvotes

Looking for a mobile coding app but most r either slow or missing features.

I use Acode — auto-complete's weak & running code is slow.

Pydroid 3's good but syntax highlighting sucks, hard to spot errors.

Tried Termux + Python — tough. Neovim didn't work, couldn't install it right.

Any other app or plugin to fix this?


r/PythonLearning • • May 16 '25

Discussion Is it still worth learning Python today in the time of LLM?

2 Upvotes

I apologize if this has been asked before, but I would really like to know if my time is being spent well.

I actually wanted to start learning python because of LLMs. I, with no coding background, have been able to generate python scripts that have been extremely helpful in making small web apps. I really love how the logic based systems work and have wanted to exercise my mental capacity to learn something new to better understand these system.

The thing is, the LLM's can write such good python scripts, part of me wonders is it even worth learning other than purely for novelty sake. Will I even need to write me own code? Or is there some sort of intrinsic value to learning Python that I am over looking.

Thank you in advance, and apologies again if this has already been asked.


r/PythonLearning • • Aug 08 '26

It's my 2 nd or 3rd week of learning python and made a app (read body)

2 Upvotes

(logic and app design done by me used a bit of ai for button and stuff as I completed it in 3 days) any tips? It's v0 and I want to make it better it's for my personal use as I keep on forgeting my password and imp notes and I don't like notes app any advice u advance people would like to give to me to improve it


r/PythonLearning • • Jul 27 '25

Help Request Keep getting Error for Ai programming

Post image
0 Upvotes

I keep getting this error message when I try to put in the command “python3 ./agent.py console” and says “no such file in directory” little confused


r/PythonLearning • • Jul 24 '26

Help Request Does ChatGPT help with programming?

0 Upvotes

I'm a beginner in programming and I want to know if the way I use ChatGPT is right. When I do a practice exercise, I first try to solve it by myself. Then, if my code is wrong, I ask ChatGPT what I did wrong, but I tell it not to give me the answer. I ask it to give me hints that help me think about the logic of my code.

I also want to know if using AI to learn programming can help me improve in Python.


r/PythonLearning • • Jul 19 '26

I am doing cs 50 python but what even is wrong with this like why is this program not working

Thumbnail
gallery
0 Upvotes

r/PythonLearning • • Jul 29 '25

Help Request Python or c++ for A Girl?

3 Upvotes

I am a girl who wanna learn CS ahead of time when I graduate and go to a college,I think it will benefit a lot and makes more possibilities in my future. But I don’t know :1.learn what? 2.how to 3.if I can have my Mac only on weekends,how much should I spend on learning cs?


r/PythonLearning • • Aug 01 '26

I wanna learn python

0 Upvotes

People usually say Python is an easy programming language, but as someone with no programming experience, I find it really hard. Can you guys tell me where I should start? Also, what benefits will I get from learning Python?


r/PythonLearning • • Oct 21 '25

Am I a hacker now?

Post image
0 Upvotes

r/PythonLearning • • Oct 07 '26

Help Request Should I start learning python or ai?????

0 Upvotes

r/PythonLearning • • 21d ago

I’ve started learning Python through self-study, so I don’t get certificate. Is that an issue?

0 Upvotes

r/PythonLearning • • Jun 30 '25

Buying my first laptop but my range is around 30k - 35k

0 Upvotes

So I completed my 12th and now doing bsc in CA from a good college, want to learn coding and pursue a future in it but was confused to buy a laptop. I researched about it on Google and YouTube but was not sure which one to buy. Belonging from a lower middle class family my budget is from 30-35 k . The option that I really liked was "Aser Aspire Lite" which was around 33k with good enough specs. Can you guys help me out please. Thank you <3


r/PythonLearning • • Nov 08 '25

They should really see this

Thumbnail
gallery
4 Upvotes

I use vs editor I just started learning python like 3-4 days ago ,I have learnt C before. Today I decided to make a program to add sub mul ex i I have done it in C before so I had a basic idea I mostly has it done but it wasn't working so I saw how it was done I CHANGED MY WHOLE FKING PROGRAM EXACTLY AS SAME AS SHOWN I STARTED WITH JUST CHANGING INT INPUT STUFF IT STILL DIDNT WORK ,AFTER I LITREALLY MADE IT SAME AS SHOWN IT STILL DIDNT WORK I HAD A SUSPICION ON THE GOOGLE ONE I TESTED IT AND IT WORKED BUT MINE WHICH IS EXACTLY THE SAME AS SHOWN ISNT WORKING

TURNS OUT VS EDITOR WAS ONLY OUTPUTING MY PROGRAM WHICH I SAVED NOT THE ONE I CHANGED

IF THERES A SETTING TO TURN THIS FEATURE OF PLS TELL ME I LOST KY MIND FOR LIKE 20 MINS .


r/PythonLearning • • Apr 27 '26

Discussion J’ai modifier le ligne de code comme on me la conseillé (merci beaucoup pour ce qui m’ont donné c’est précieux conseils)

Post image
1 Upvotes

Je fait essayer de mettre un tranche d’âge genre entre 10 a 40 ans ect je fait un peu me renseigner


r/PythonLearning • • Jun 24 '25

21F anybody wanna do a group study on python

1 Upvotes

r/PythonLearning • • May 10 '26

Showcase im a beginer and i just made a very simple ai that can can play tic tacc toe.

1 Upvotes

the code:

tie = None
import sys
print("you ready to loose?")
print("i choose 5")
first_move = int(input())
if first_move == 1 or first_move == 3 or first_move == 7:
    print("i choose 9")
    my_first_move = 9
elif first_move == 9:
    print("i choose 6")
    my_first_move = 6
elif first_move != 4:
    print("i choose 4")
    my_first_move = 4
else:
    print("i choose 1")
    my_first_move = 1
second_move = int(input())
if my_first_move == 6:
    if second_move == 4:
        print("sorry but this will mathmaticly end in a tie bye")  
        sys.exit("tie")      
    elif second_move == 7:
        print("i choose 4 i win!")
        sys.exit("i won")
    elif second_move == 8:
        print("i choose 4 i win!")
        sys.exit("i won")
    elif second_move == 9:
        print("i choose 4 i win!")
        sys.exit("i won")
    elif second_move == 2:
        print("i choose 4 i win!")
        sys.exit("i won")
    else:
        print("i choose 4 i win!")
        sys.exit("i won")


elif my_first_move == 9:
    if second_move == 4 or second_move == 8:
        print("i choose 7") 
        my_second_move = 7  
    elif (second_move == 3 or second_move == 7) and my_first_move == 9 and first_move != 1:
        print("i choose 1 and i win... how did you mess up that bad?")
        sys.exit("i win!!!!")
    elif second_move == 3 or second_move == 7:
        print("sorry mathmaticly this will result in a tie bye")
        tie = True
        sys.exit("tie")  
    elif tie == True:
        sys.exit("tie")
    elif second_move == 1 and first_move == 3:
            print("i choose 2 and it will be a draw")
            sys.exit("bye")
    elif my_first_move == 9:
        if first_move != 1 and second_move == 6:
            print ("i choose 1, i won how? because im smart")
            sys.exit("ai won")
        elif first_move == 1:
            print("tied")
            sys.exit("bye")
    else:
        if first_move != 3 and second_move != 3:
            print("i choose 3")
            my_second_move = 3
        elif first_move != 1 and second_move != 1:
            print("i choose 1 i won!!!")
            sys.exit("ai won")


elif my_first_move == 4:       
    if second_move != 7:
        if first_move == 6:
            print("i choose 7")
            my_second_move = 7
        elif my_first_move == 4:
            if second_move != 7 and first_move != 7:
                print("i will go to 7")
                my_second_move = 7
        else:
            print("mathmaticly im sorry this will end in a tie")
            sys.exit("bye it was a tie")
    elif second_move == 7:
        if first_move == 6:
            print("this will end in a tie")
            if first_move == 6:
                sys.exit("tied! 67!!")
            else:
                sys.exit("just a plain old tie")
        elif first_move != 6:
            print("how a bout.... 6")
            sys.exit("i won!")
    elif second_move != 6:
        if first_move != 6:
            print("i choose 6 i win!")
            sys.exit("i won!")
elif my_first_move == 1:
    if second_move != 9:
        print("ill go with 9 i win")
        sys.exit("i win")
    else:
        print("ill pick 7")
        my_second_move = 7
    



third_move = int(input())
if my_first_move == 9:
    if my_second_move == 7:
        if third_move == 8:
            print("i choose 3 i win!")
            sys.exit("I won!")
        elif third_move == 3:
            print("i choose 8 i win!")
            sys.exit("i won!")
elif (my_first_move == 4):
    if my_second_move == 7:
        if third_move == 1:
            print("i choose 3 i win!")
            sys.exit("i won!!!")
        else:
            print("i choose 1 i win!")
            sys.exit("i won!!!!!")
elif my_first_move == 1:
    if my_second_move == 7:
        print("sorry it will be a tie")
        sys.exit("tie :(")
elif second_move == 1 and third_move == 6:
    sys.exit("tie")



print("if you some how got here you or i messed up")

i started about 2 weeks ago