Python : Sorting File Names Based on Extensions

Опубликовано: 31 Май 2026
на канале: Grow with Data
184
10

Video 37: we delve into sorting a list of file names by their extensions. Throughout this tutorial, we explore various sorting techniques. We start by understanding the basics of list sorting and its reverse order. Next, we explore sorting based on string length and the last character within elements. Subsequently, we demonstrate how to isolate file extensions from filenames and sort the list accordingly. Lastly, we combine sorting by file extension and filename to create a comprehensive sorting sequence.

The steps covered in this tutorial:

1. Sorting letters considering both uppercase and lowercase.
2. Sorting lowercase letters exclusively.
3. Implementing descending order sorting.
4. Sorting elements based on their length.
5. Sorting by the last character within elements.
6. Extracting and sorting file extensions alone.
7. Sorting filenames based on their extensions.
8. Combined sorting by file extension followed by filename.


code: https://github.com/jeganpillai/python...

Video on longest substring without repeated characters:    • Python : Longest Substring Without Repeate...  

Follow me on,
Website : https://growwithdata.co/
YouTube :    / @growwithdata  
TikTok :   / growwithdata  
LinkedIn :   / growwithdata  
Facebook :   / growwithdata.co  
twitter :   / growwithdata_co  
WhatsApp : https://whatsapp.com/channel/0029VaF8...
Instagram :   / growwithdata.co  


#recursive #countingalgorithm #list #looping #listmanipulation #uniquesubstring #longestsubstring #slicing #lineartimecomplexity #python #pythonquestions #pythontest #pythonprogramming #pythontutorial #python3 #pythonforbeginners #interviewquestions #interview #dataengineers #deinterview #pythoninterview #interviewquestions #leetcode #placementpreparation #meta #google #facebook #apple #netflix #amazon #google #faang #maanga #dataengineers #alphanumeric #nonalphanumeric #growwithdata #set #split #remove #pythonfunctions