I've been learning programming for about a year now, starting with an intro to C++ class. I did pretty well with it and grasped the concepts fairly easily. However, I've recently transferred to a university where all classes are taught in Python, and I've found it really challenging. I've completed one Python class, but I barely managed to keep up and still feel completely lost. I'm currently using "Automate the Boring Stuff with Python" and while I understand the concepts, I freeze up when trying to write even simple programs. In C++, I was comfortable creating basic programs that included functions and file handling. But now, I can't even iterate through a list or insert items in Python without struggling. I feel like I'm missing something fundamental that's blocking my understanding of this language.
5 Answers
Don't stress too much! The differences in programming paradigms can make it hard to switch gears. Python is more focused on high-level abstractions compared to C++, which is more about managing memory. If you keep a clear mental model of each language, it’ll help you focus on Python's unique features.
It might feel overwhelming now, but remember that learning to code is all about logic design. Python's abstract nature can be tough if you're used to C++. If you can, try to find a mentor or a friend who can guide you through the concepts. And don't underestimate self-practice; the more you code, the easier it'll get!
When you're writing Python code, try to think more in terms of the language's design. For instance, Python relies heavily on indentation instead of curly braces, and understanding how lists and data structures work differently than in C++ can help clear up some confusion. Don't hesitate to practice basic loops and list manipulations; they can be a little different between the two languages!
I had a hard time with looping too! I was trying to write loops that summed up user-defined ranges, and it took me forever to figure it out — it just feels different in Python.
Transitioning languages takes time. Honestly, I've been a professional Python developer for over a decade and I have my gripes about Python. Just stick with it—if your curriculum requires it, you just have to keep practicing to overcome those hurdles.
What don't you like about Python, though? I'm curious! What makes it tough for you?
That's interesting to hear! What do you find more enjoyable than Python?
Switching from C-based languages like C++ to Python can be tricky since the syntax is so different. It might help to keep practicing the basic syntax, especially for loops and data structures—even seasoned developers occasionally have to look things up!
A mentor would be amazing! But since I'm doing this online, it's hard to find someone to help who can explain things one-on-one.