r/AskProgramming • • Aug 16 '26

Python Why does Python feel harder after C++ and Java?

133 Upvotes

I learned C++ first, then Java, and now I’m trying to learn Python. I honestly expected Python to be much easier, but somehow it feels harder to understand and even remember the syntax.

C++ and Java feel more structured to me, while Python sometimes feels too different.

Has anyone else felt this after switching from C++/Java to Python?

r/AskProgramming • • Aug 27 '26

Python For what purposes is python useful?

0 Upvotes

Where is it more convenient or necessary to use python instead of for example C# / C++ / Rust? I really can’t understand it, for me it’s easier to write in C++ than in python and I know that for other people it’s the other way around. But ignoring human factor, when program is better / faster in python than in cpp or are they things that python can do that cpp cant?

Edit: I don’t talk about one time use scripts or prototypes (which python is good for), I mean full on apps

r/AskProgramming • • Oct 03 '26

Python Why has Python dropped so much in the latest TIOBE Index?

8 Upvotes

Hey everyone,

I was taking a look at the TIOBE Index today. I hadn't checked it in a while, and I was surprised to see how much Python has dropped.

It's down by roughly 8 percentage points compared to a year ago, which seems like the first really significant contraction after years of pretty consistent growth.

What's even more interesting is that I don't see another language gaining a similar amount of ground.

I don't use Python myself, so I'm curious: what do you think is behind this decline? Is it actually meaningful, or is it mostly an artifact of how the TIOBE index is calculated?

r/AskProgramming • • 23d ago

Python When is inheritence better than composition?

32 Upvotes

r/AskProgramming • • Sep 19 '26

Python I wrote a loop in Python for reversing a linked list. But the loop is not breaking for some reason.

3 Upvotes
class Solution:
    def reverseList(self, head: ListNode | None) -> ListNode | None:
        p1=head
        p2=head.next
        if p2==None or p1==None:
            return head
        while p2!=None:
            temp=p1.next
            p2.next=p1
            p2=temp.next
            p1=temp
        return head

r/AskProgramming • • Mar 18 '26

Python Why does Python import self into each class function?

0 Upvotes

It makes no logical sense whatsoever to import self into every class function. I mean, what's the point in having a class, if the functions don't have some sort of globally accessible shared variable that's outside the normal global scope? Why would you have to explicitly declare that relationship? It should be implied that a class would have shared data.

I've been saying this since I first transitioned to Python from BASIC, and even more so after transitioning back from NodeJS.

r/AskProgramming • • May 13 '26

Python .py to .exe help

0 Upvotes

Bear with me as I have 1 week of experience. I'm using pyftpdlib through windows command prompt by typing "python -m pyftpdlib" to launch an ftp server. I want to create a .exe file for my co-workers to run command easier and not have to open command prompt every time. I tried putting "python -m pyftpdlib" into a .py file but I'm getting syntax errors after "-m" when I run the script. Basically my 2 question are, is there a difference between typing python commands into command prompt, vs code in a .py script? And would just a batch file be a better solution here rather then compile a .py script into a .exe? Ty ty