While True: print("God Bless You for your time and effort")
@krzysztofbandyk1685 жыл бұрын
I'd suggest adding at the end so instead of: God Bless You for your time and effortGod Bless You for your time and effortGod Bless You for your time and effort You'll get: God Bless You for your time and effort God Bless You for your time and effort God Bless You for your time and effort It's a lot neater that way.
@gingerboy91705 жыл бұрын
@@krzysztofbandyk168 no need bruh.... Each print statement starts writing from a new line...😇
@krzysztofbandyk1685 жыл бұрын
@@gingerboy9170 must have thought of another language. I just kinda assumed it worked like that well that's just a good example of why you need to run your code before correcting people on the internet.
@SikandarKhan-ys1ik4 жыл бұрын
@@krzysztofbandyk168 stuck in C!!! 😂
@janpoonthong4 жыл бұрын
Exactly
@ericlambert70465 жыл бұрын
Please do more like this - the real world application and step-by-step process to create the solution is invaluable! Great stuff. Thanks.
@Spicy49611 ай бұрын
8 years later this video is still useful, keep up the good work man, and thanks for these types of videos.
@gambarusso7 жыл бұрын
I feel like a real IT guy right at this moment.
@kaifs9764 жыл бұрын
kzbin.info/www/bejne/jIGcZ5mgdrVqgsU
@pauls70567 жыл бұрын
Wow, I know little about Python but this is about the first tutorial I've seen posted which didn't swamp me with jargon and show me tiresome tasks like counting the letters of my name. Instead, it showed what Python can do that is useful. Really interesting. Thanks for posting - you've restored my interest again.
@kaifs9764 жыл бұрын
kzbin.info/www/bejne/eaKTq3uGp7qHotE
@illegalsmirf2 жыл бұрын
This is SOOO much more useful than standard Python tutorials, thanks and please do more
@vpavansaivivek7 жыл бұрын
This is My First Comment on KZbin in 4 years of Usage. Never felt like Commenting. But for the first time, Salute to you Corey Schafer for such brilliant Tutorials!
@kaifs9764 жыл бұрын
kzbin.info/www/bejne/eaKTq3uGp7qHotE
@kaifs9764 жыл бұрын
kzbin.info/www/bejne/jIGcZ5mgdrVqgsU
@bijogxazindagi75454 жыл бұрын
wanted to like but didn't like your comment because that's my roll no in College.
@svenmoon98757 жыл бұрын
OMFG! Besides the great teaching through simple instruction, I'VE NEVER SEEN SIMULTANEOUS TYPING BEFORE! AMAZING! MIND BLOWN! Seriously, I can't stop smiling.
@prasanthmanimaran75407 жыл бұрын
It is a special feature of Sublime Text that he is using.
@OliverSteadman6 жыл бұрын
can also do it in Jupyter Notebooks
@nolanoreilly6 жыл бұрын
I nearly wept when I saw that.
@OliverSteadman6 жыл бұрын
Gabriel Sena de Souza sure, just click in one place, then hold down Ctrl and click in another place. On some environments it might be Alt or another key, instead of Ctrl.
@axel.foley.19845 жыл бұрын
In Pycharm ⌘ + ⇧ + 8 (Mac) gets you in multi-edit mode. Then Hold Shift up/down/left/right to select multiple areas.
@dilipwarrier51997 жыл бұрын
Wowwww...it blew me off...one of the best videos i have ever seen. The tempo of delivering it and the quick way you wrote the codes and executed them shows the level of mastery you have. Hats off and thanks a lot @Corey.
@cz48b15 жыл бұрын
1) Almost exactly what I needed to organize my photos (hundreds of them). 2) Learnt several new things in a 12 min video. Thank you so much for sharing!!! Greetings from Brazil.
@christianhaugen94624 жыл бұрын
I know this video is old, but you make some of the best content that I've learned from. thanks so much man.
@JuanSidberry7 жыл бұрын
Outstanding! Even TWO Years after you posted this, this video is extremely helpful and adding value. Will check out your other stuff. Like your style. Thanks.
@finedinerest2 жыл бұрын
This is exactly what any developer would dream to do with any programming language, thats is to automate daily routine and manual work. Thanks for making video so concise and would love to see more such videos in future.
@karmarocks8 жыл бұрын
@Corey Schafer, I am doing lot of PERL for long time, wanted to master Python. Like you know, only learning all tutorials in the world does not give confidence to solve real world problems like this. I am REALLY glad that you took efforts in uploading this beautiful simple script. Any videos on practical issues ALWAYS welcome and much appreciated !!!
@narcisenet7 жыл бұрын
BIG THANKS!! I've just started learning python without any programming background. Your videos and the way you explain Different steps helped me very much. Also your real life scenarios motivates me not to stop mastering Python. Thanks again.
@MohammedAnsariRiz4 жыл бұрын
I am starting with python to solve the very same problem you solved here. You explained it so well.The zfill blew me up! Thanks a million.
@plovectut9 жыл бұрын
Thanks for brilliant tutorials. I really like them and please keep on doing them! Just a quick note for records: If you did f_name.split(' - ') instead of f_name.split('-') you wouldn't need to .strip() f_title/course/num
@coreyms9 жыл бұрын
+plovectut Great observation! Definitely would have saved some lines of code that way. Thanks.
@gingerboy91705 жыл бұрын
Well done dude.... I didn't even notice why did that happen...😅
@zork99995 жыл бұрын
That works here but I would do it as in the video in case the space was omitted or if there were more than one space by mistake in any of the filenames.
@kaifs9764 жыл бұрын
kzbin.info/www/bejne/eaKTq3uGp7qHotE
@satishadhikari51804 жыл бұрын
I did a list comprehension instead, but a nice one!
@carlosguzman11965 жыл бұрын
This was a really entertaining tutorial that I can actually use. You were straight to the point and werent talking about other stuff that dragged on. I really liked how you did the side-by-side to show the up to date changes. Thanks and please do more tutorials like this.
@lincolnkarim17 жыл бұрын
Love it--no unnecessary talk and explanations--you cut to the chase. I wish more learning videos can be as concise so as to keep the flow going--realizing that people can pause and cross reference things that are not clear. Thanks for the education.
@MachineOverlords7 жыл бұрын
Please keep doing this type of video! There is a time for longer theory or syntax videos, but this was perfect to walk through solving a real problem. Keep as much detail in as possible while explaining your decisions for what you are doing. It helped immensely to hear your thought process and see how you used print at various steps to confirm proper function of results you wanted. Well done.
@TEODOEMONEY18 жыл бұрын
I was skeptical at first because all of the click and miss videos I've watched but this is a great video and you're a GREAT teacher. Thanks.
@ricksegalCanada3 жыл бұрын
Corey, this, 6 years later, is the brilliant, "here's how", high signal, quick videos should be done. I hope everybody doing YT videos gets to see this as a text book example of what to aspire to. Super helpful and allowed me to back away from glob for this type of actions. Well done.
@rasulesmaeilbeigi55176 жыл бұрын
I would watch your tutorials a hundred times without being bored or tired. Your tutorials ara extremely helpful and interesting. Thanks A LOT for sharing them. Please continue this.
@maxinteltech33214 жыл бұрын
Combination of regular tutorials and examples like this could be super useful. PLEASE CONTINUE IT
@Quotient1535 жыл бұрын
WOW!!!! You have explained this in an amazingly easy to understand manner. If I didn't already have a son I would have named my first born after you! But really, this was super helpful. THANK YOU
@abhishekmittal72133 жыл бұрын
This is the true essence of programming. Most of the videos out there just focus on the syntax part without any demonstration of how this knowledge of a programming language can be harnessed to make life easier on an individual scale. They only deal with how to crack interviews etc. I would love to watch more of these videos
@melshman7 жыл бұрын
I really LOVE this type of real world example! Would love to see more like these. THANKS!
@sitrakaratsimba81036 жыл бұрын
As an intern, my job was to rename boring stuff nobody wants to do, I did that manually for a week, I wish I saw this before, haha! I was so motivated to learn programming after that internship so here I am, damn, thank you Sir!
@lilmoesk8998 жыл бұрын
Awesome video, man. I've watched dozens of videos about Python on youtube, and yours are consistently the clearest, most concise, and informative. Please keep making more!
@priyanshukumarsingh57315 жыл бұрын
such types of practical implementations gives a better understanding of the language, it was very usefull sir.
@kaifs9764 жыл бұрын
kzbin.info/www/bejne/eaKTq3uGp7qHotE
@aaronag78765 жыл бұрын
This was exactly what I was looking for, as a newbie in Python, I have hundreds of pictures saved from old mobiles, cameras etc and stored on a hard drive. Have been putting off tidying them and sorting them for almost 3 years, but thanks to your great tutorial, this will save me hours if not days of work. Thank you and please post more of these helpful videos, for us Newbies learning Python, who don't want to watch "Learn to code Python, length of video 9 hours" !!! just to spend the first 5 hours downloading and customising our IDE and type "Hello World" . We want quick easy practical get your hands dirty type vidoes that last no more then 5 to 15 mins, because our attention span is limited due to the magpie effect of shiny things distracting us. Thanks again.
@satoshinakamoto1715 жыл бұрын
you should definitely do more videos like this . this only motivates us to learn more. Thanks
@alexrsnh4 жыл бұрын
These videos are my go-to for learning python. Clear explanations in manageable chunks. Thanks Corey.
@dragonfly-76 жыл бұрын
Corey, this kind of videos is very useful. Please continue to provide tutorials based on real world challenges !!! There is nothing better than getting educated in programming based on those !
@acdii5 жыл бұрын
Wow, I have been trying to find an example to rename a file for weeks. I tried Bash, Perl, and ran across this one this morning, and within 30 minutes had exactly what I needed, and it WORKED!!! Thank You very much. Now the fun part, getting it to not fail when old files already renamed are still there. Hoping the next step template to move the file to SFTP will actually delete the file so it wont fail.
@mobaius64794 жыл бұрын
I'm so surprised the only normal video that actually teaches you to how to do it, and not only copy-paste is from 2015 and has such a low amount of likes and views. WHY? Thank you so much, I'm glad I found you. Probably saved me a day of reading just to understand what I understood from this video in 15 minutes
@itguy1085 жыл бұрын
Your Python videos are very clear and efficient easy to understand, no confusion. Better than other people's. Very helpful.
@maziarghorbani8 жыл бұрын
It was very helpful. In fact when a programming language is put to test to solve real-life problems with efficiency, it motivates the learner to carry on learning. Thank you Corey.
@daviddesouza4837 жыл бұрын
Some of the clearest and most useful Python tutorials there are. Thanks
@doodahgurlie Жыл бұрын
Such an AWESOME video! This really brings all your previous videos together and show us how Python can be used to fix repetitive tasks in our everyday lives. Please do more of these!
@man_vs_life2 жыл бұрын
F'n brilliant. I've been wanting to take a look at Python but never took the plunge. This is a really practical example that has made me realise that I've been missing out. A big thank you, including the incredibly clear and well paced presentation. Subbed.
@danielvictormusinguzi6 жыл бұрын
Corey, your transcending ! The day I found your channel, I found "GOLD" : -) Your videos are precise and professional, thanks.
@andrewstebbing16465 жыл бұрын
I've only just discovered your KZbin channel, Corey, and this is another great video; easy to follow and well explained. I have followed along, then written a reverse script to put the files back in their original order. I've also duplicated both scripts using Paths from the pathlib module. Your instruction makes this so easy to do - thanks
@aryan7069_4 жыл бұрын
Amazing😍 i am liking these videos.. please upload as much as you can sir🙏🏻🙏🏻
@ranbirmittal14 жыл бұрын
Nobody can explain things the way you do. Great work. Thank you Sir.
@gganesh96 жыл бұрын
Yes. these real life videos are really helpful as well. You are doing an amazing job with this channel. It takes talent/skill, patience and motivation to be a great teacher and an inspirer. You have a knack for teaching things that are easily understandable. Kudos. Keep them coming. Thanks.
@frankoberheim10958 жыл бұрын
at first sorry for my English.... I'm come from Germany. German people's like only his mother language. Thank you for your video tutorials here at KZbin... What should I say... your videos are so helpful and easy to understand, that's so great. I hope we will see a lot of other Python video's here. I bought few Python books written in German but I have to say pity I bought this books. they cost me a lot of money but the books are not really helping to learn Python. they make me only confused. but now I found your video's... some of the things I have read are clear now coz of your videos. Thank you so much. Greetings from germany
@ForceTranq3 жыл бұрын
Was looking for something else, but just decided to watch this for learning purposes only. I got say you're really good dude. very insightful. I like how you kept it clear and concise. Great Work!
@silvia33045 жыл бұрын
This video is a masterpiece. It sums up many lessons in a simple manner and shows how to rationally solve a problem using python. Thank you.
@lewi5942 жыл бұрын
This was immensely helpful !!! I was stuck trying to truncate file names through a loop but your systematic approach helped me figure this out. Much appreciated
@kingstonpeng10766 жыл бұрын
I agree with many other students like me, this is the best Python lesson I have every learned.
@kaifs9764 жыл бұрын
kzbin.info/www/bejne/jIGcZ5mgdrVqgsU
@jaynj9085 жыл бұрын
I actually wrote my first script on this. I am debugging but it does work. Great vid
@georgiosdoumas24464 жыл бұрын
Another way to transform f_num from '#5' to '5' (at around 8:40 ) would be f_name.strip('#') Great video , and I especially like the methodical step-by-step (with printing just to check what we have achieved-so-far) approach up to the final solution.
@wasirizvi24374 жыл бұрын
Wow, I was looking for this sort of thing. My use case was that I had 114 audio files for each 'surah' in the Quran and I used to do this manually to arrange it sequentially for a playlist, like 001 etc. Thanks a lot Corey, you are a gem !
@azmi78737 жыл бұрын
this is exactly what I wanted to do long time ago. I renamed my files by right clicking -> "rename". Thank you Corey. If only I knew your course back then..
@ASilva-gb2rq5 жыл бұрын
Corey - I think this videos are great, as you know problems like this tend to repeat themselves so having a quick solution is great.
@rjbush79553 жыл бұрын
Brilliant! This is one of the main reasons I'm learning Python. I'm no dev but there are things I need Python to do to save my sanity at work. I do a lot of ETL to Excel and have to handle loads of garbage file names. Thanks
@ryandavis88132 жыл бұрын
This was awesome. I’m a few weeks into learning python and this is the first real world example of what it can quickly do that I’ve come across and I was able to follow all of it! I don’t know much about the module you imported (OS) but this was super encouraging to know that I could figure this out with my existing skillset. Great video, thanks for posting!
@monasaleh14523 жыл бұрын
I can't stop watching your video. You made it so interesting and fun to watch. Thank you for posting them on KZbin.
@katerynaselcuk96153 жыл бұрын
Super useful! Thank you very much! I would absolutely love to see more of this kind of videos. Seeing how you approach the problem and the process you go through in real life in order to solve it, certainly is tremendously helpful to those who are still new to programming.
@Ghasakable5 жыл бұрын
Please please continue with such videos, your classes level now reached to a different dimension, thank you very much for your efforts
@johnsteidley4776 жыл бұрын
Have watched a lot of your work. Great stuff. The real life task is a good format and the tips along the way like, ‘one step, test’ are useful too. Thanks for your contributions to the community.
@Chrisshao8 жыл бұрын
Perfect Tutorial. No doubt Learned Multiple functions and concepts in 1 video
@kingstonpeng10766 жыл бұрын
This small tutorial is one of my favorite. Mr. Schafer's instruction is so clear, so precise, and the content is so useful. Each step he explained with extremely clear logic, very easy to understand and very easy to follow. I wish Corey could provide us more of this type of real Python usage examples. I will keep this tutorial and go to as many as others that Corey Schafer presented on KZbin. Thank you so much, Corey.
@Xalantor6 жыл бұрын
I've encountered this exact problem hundreds of times and is was so frustrating to reformat even 20+ names. This is great!
@officesuperhero96116 жыл бұрын
Hi Corey, excellent video. You asked if we like these. It is an excellent video and I love it. Your tutorial here has a lot of great practical applications, which is something that many videos lack. Great job, again!
@shazkingdom17024 жыл бұрын
You are industrious... you made this December.. what a gift :) Thank you
@ajitesh7645 жыл бұрын
The first thing I did immediately after watching the video is LIKE it....really nice video tells us how we can use python in our day to day life. Make more of these kind of videos.
@tamircohen15127 жыл бұрын
One of the best and only read world python tutorials out there. Thanks!
@echambers11122 жыл бұрын
This is so well presented. And timely (ha! it's a video from 2015) because I'm attacking a messy folder of music files and this is on point. Love that he say to work through it iterating as you go, it seems more approachable that way.
@thunderdand8 жыл бұрын
Thanks Corey, this tutorial was very helpful! I added the following :) directory = raw_input("Please Enter directory path. macOS - Drag folder (directory) into terminal: ") os.chdir(directory) for f in os.listdir(directory):
@Codie__7 жыл бұрын
One of the best beginner python videos I've seen. Really helpful, thanks.
@resford12 жыл бұрын
This is the video I've been looking for! It makes so much sense doing real world problems vs. the 'projects' in books.
@mednejad4 жыл бұрын
Great little script. I'm just starting out Python and I can't get over how powerful it is. Great job 👍
@rory16535 жыл бұрын
@corey, that was one of the BEST python videos I've seen! Thank you! p.s. your trick with typing on three lines at once was awesome! Never seen that anywhere.
@scottsmith45684 жыл бұрын
Please do more of this kind of thing. I love this, because it really shows me how programmers approach problems.
@VictorOlet5 жыл бұрын
Corey, this is great! This is something I face often and one of the reasons I wanted to learn Python (Coding). Please do more videos like this!
@rotrose75315 жыл бұрын
Thank you, your practical approach to the subject is amazing!
@AspireTutorials5 жыл бұрын
I ran into the very same problem today. Thanks a lot for the great video.
@uberkhan3 жыл бұрын
This is what I was looking for some time ago. Clearly explained, and in such a simple way. thx for the video.
@santii9305 Жыл бұрын
This is quite useful for data cleaning
@ripperx4446 жыл бұрын
Your tutorials are amazing. Just enough info to be powerful after 12 min of watching!
@roshunepp3 жыл бұрын
I watched this video months ago. Just this past week I spent 2 days trying to figure this out reading pathlib documentation etc. This fixed in a few minutes what I was struggling with for a few days. In my case, I'll take the file name, run a SQL query and use that result to change the filename. I feel silly but thank you so much!!
@BeginBye4 жыл бұрын
Whoa, I used to do similar stuff, but did not know about zfill() Such a wonderful thing it is. Way more readable, laconic encapsulation than the mere condition I used.
@ankishbansal4205 жыл бұрын
Very infomative, Thanks for sharing these video. Every time, i come to your channel, i learn something.
@alwayspositive93214 жыл бұрын
Thanks Corey! I renamed 90 videos in my phone just by writing a code in my Pydriod3 app. 😁
@greatvedas8 жыл бұрын
Buddy... Best text parsing video for beginners. Lots of things brought to light.
@omaram19808 жыл бұрын
This is great Corey, Please keep feeding us this functional tools that can be used on day to day. Thanks -Omarali
@krishyket Жыл бұрын
This is a very cool project. I'm binge watching these vids right now and loving them.
@siddharthpandey32044 жыл бұрын
You're the best, man!! I had just started looking for Python Automation and came across one of the best tutorials in the first place. Great, calm way of explaining things, crystal clear. Thanks a lot, keep creating such content.
@mahmudulhasan4434 жыл бұрын
Please make this kind of videos more often. You're amazing
@TheChinobi237 жыл бұрын
Perfect, Thanks to you and others good people like you i can code in python, 6 months and already doing my own networking tools for my job, so THANK YOU
@coreyms7 жыл бұрын
Awesome. That's good to hear. And thanks!
@KDemosh5 жыл бұрын
This is the best video! There's so much to gather from this!
@aplifiedchaos5 жыл бұрын
I'm learning python right for work, and I gotta say you really have a great skill for teaching. I am looking forward to your videos.
@Ashfordprincess6 жыл бұрын
I am beyond words. Thank you for the tutorial.. i am only halfway through a python basics course, but man, i aspire to be this good someday.
@cat196494 жыл бұрын
For the lower level viewers here like myself these are helpful to understand the basic applications of python. Also they are directly useful in most roles at work. I'm already thinking about those massive directories at work that could use some housekeeping.
@thoughtsontravelandlife4 жыл бұрын
9:40 That z-fill trick is very helpful. I was confused for a long time as to why it was adding 0 to all the numbers except for 10. (I was thinking, 'z-fill is set to 2, so shouldn't it take both digits from 10 and turn it to 00?') But I finally realised that z-fill only fills the characters that DON'T EXIST and turns them to 0. So since 10 is the only f_num with 2 digits, it remains the same, while all the others get a 0 added. Neat solution!
@dellsantiago81084 жыл бұрын
You sir are a legend.. Now seeing this coding is more of art than logic as well. Very smart .. very genuis
@EcleticMusicFilm7 жыл бұрын
Great, I've watched a few of your videos and you have a knack for explaining things well. Thanks for the videos, they're great!
@vikalaw38873 жыл бұрын
I have been looking for a solutions for a while, your video literally saved my life!