A fun Project/Exercise while learning Python, or any New language
Satya Komatineni
Discover what I do not know. Work Ceaselessly in its pursuit.Programming, Curiosity, and Kindness is enough! Inspire others, if not enable.
A fun exercise in Python: Command line Directory Indexer
Here is a fun exercise to learn any new language, like Python in this case. I do this as one of the first things while learning a new language: Write a utility for yourself in that language.
I have done this when I was learning MS PowerShell, Julia, and Python.
Here is one of my favorite utilities.
Command line Directory Indexer
Write a command line python program which does the following:
Time frame
You should be able to do this in a couple of hours. Bonus work may take a few more hours and some planning.
Concepts covered by this Exercise
This exercise covers
领英推荐
You can use ChatGPT as your assistant
?Use ChatGPT to prompt you the code for each function ??
Practical use of the utility
I have over a dozen different programming systems installed on the laptop. When I take a gap from one system to another, I forget where I have installed these programs and what key directories I kept the source code.
The directories can be personal directories like photos, documents, repos, or whatever.
I call this utility "chdirs.cmd" which is set in the path. This allows me to remember all the important past and present directories.
About the Picture
Female Tree Deity with Attendant, About 973 Sandstone, NW India, Rajasthan, Sikar, Harshagiri - Cleveleand Museum of Art