Python Filename Without Extension


How can I get a file name without extension in python?



A regex should not be used in most of the cases.


This will also be responsible to handle a filename like .bashrc correctly by keeping the whole name.


If you want to unleash your potential in this competitive field, please visit the Python course page for more information, where you can find the Python tutorials and Python frequently asked interview questions and answers as well.


This topic has been locked/unapproved. No replies allowed

Login to participate in this discussion.

Leave a reply

Before proceeding, please check your email for a verification link. If you did not receive the email, click here to request another.