Extracting File Extensions

Write a Python regular expression to extract the file extension from a list of filenames. The filenames may include paths and the extension is the substring following the last period.
["/home/user/docs/report.pdf", "archive.zip", "images/photo.jpg", "/path/to/something/file.tar.gz"]
Total : 1 Discussion
Login
codepee
    
can you please tell how it is
can you please tell how it is
Reply     
codeexperts
     25-06-2024 06:38 AM
Your code is this
Your code is this