r/learnpython • • Nov 27 '20

Milestone - 1,000 lines of code - TU r/learnpython!

Hi friends,

Just wanted to tell you all that I reached my first 1,000 lines of Python code (wanted to show a pic, but not allowed). I'm going through the book Python Crash Course, 2nd edition and doing all the exercises and some of the examples. Strongly recommend this resource, as so many others already have done. Also, I want to say a huge thank you to this community! I wouldn't have come this far without you <3

333 Upvotes

49 comments sorted by

View all comments

Show parent comments

4

u/vectorpropio Nov 27 '20

Now you can make a python script that transverse a directory and print filenames and lines of code, and total line couture at the end.

Also learn to use other tools. If you are in Linux read about grep,wc and (bu this one is more trickier) find.

2

u/fisfia Nov 27 '20

Thanks for the great suggestions!! I'll continue my way through the book first then I'll get back to you when I reached the knowledge required to do what you suggest :D

3

u/vectorpropio Nov 27 '20

Oh, I didn't read that book, so i was off in my appreciation.

I'm not sure if the book touch pathlib. If not, after you will read about file and directories go everywhere to read how to use that library. It greatly simplify work with paths and blur the difference between windows and Linux

2

u/fisfia Nov 27 '20

Sounds cool! I'm looking forward to knowing all the things your talking about ;) Edit: And I'll look up pathlib. Used it yesterday, but just copy pasted hehe an example line into what I was doing. I'll check it out for reals!