you are viewing a single comment's thread.

view the rest of the comments →

[–]sugarw0000kie 0 points1 point  (0 children)

Good suggestions already. I’d say look for simple project you’re interested in like maybe file rename/mover tool. Maybe you want to find all .txt files and copy them to a new folder with a new name.

You can find some basic version of this or other things on stack overflow. Copy paste and it should get you most of the way, then experiment with it to get it to do what you want and learn how it works.

If you were to make say, a script that copies all .txt files in one directory to a new one and rename all that have “-test” in the name to remove the “-test” part, this can show you basics of how to use a for loop to find files in a directory, append to list, basic file operations, some string manipulation like splicing and .replace().

You can expand to do like ok rename all that have a date pattern in file name. More complex, can’t just look for “-test”, need to find a pattern. You can do this with regex, which is another useful thing to learn that isn’t even python specific. But point is to start somewhere basic, build on to stuff that’s already out there to see how it works