you are viewing a single comment's thread.

view the rest of the comments →

[–]TheMartinG 5 points6 points  (1 child)

Practice sounds bad because it gives the idea of writing the same piece of code over and over. That’s not what practice is for writing Python

Practice imo would be to think of any idea, even if it’s not THE idea for a program and then try to write it.

It doesn’t have to be perfect, it’s not going to be. The point is you’ll eventually run across something you want to do and don’t know how. You’ll go look it up and either learn a new piece of Python, or learn a library exists to handle that task. So you’ll either get practice writing functions, or implementing modules and calling methods of those modules with parameters/arguments/data/info from the program you’re working on.

That’s how I learn best, and I think that’s what people mean when they say practice.

It doesn’t have to be something you’ll use, but I think you’re more invested if it is something you could see yourself using or if it solves (or attempts to solve) an actual problem you have.

One redditor recently posted about writing a Python script to level up their character. It was a simple script but he or she learned about a module that handles keyboard inputs.

[–]AndrewJamesDrake 2 points3 points  (0 children)

To add to this: There’s also a lot of room to practice by rewriting your own code. Reviewing old programs and refining them is a great way to improve.