Quoted By:
Practice. I assume that even you can do already do Hello World and 99 Bottles of Beer on the Wall.
A lot of gittin gud at computer science is learning the basic ways that things can be done. That's only partly a matter of language syntax: much of it gets into things that run deeper than any one language.
Do FizzBuzz (look this up; it's a common job-interview problem). Then do it again, without using loops. Then do it again, without using the word 'if'. Then do it again, but you're only allowed to print once.
Also, learn the basics of the Unix/Linux toolset. None of these have much to do with Python, per se, but they are all oriented toward programming one way or another, yet they will force you to think about programming in very different ways. In particular, read up on:
- sed and AWK (any flavor of AWK will do).
- find (which you might not have known was a language, but this is key to understanding how it works).
- make (even if your class uses a different build system).
- sh, ash, or dash (but NOT bash). You can learn bash too if you want, but it has some constructs that allow you to stay in the box, and you're learning this specifically to think outside the box.
I realize that this is a lot to put on someone's plate; none of these tools is large, but there are a ton of them. But this is how you git gud. You learn the different ways to do things, and your brain stretches to accommodate them. When you can think about problems in pseudocode (not any particular language, not even Python) then you are getting close.
And lastly, don't worry too much. You have time. You're only in Intro to CS; fuckups are expected. Starting to learn this stuff in parallel to your classes will put you on a better footing than many.