TAG

Programming

10 Ways to Get File Extension in Python [SOLVED]

we can get file extension in python using splitex(), split(), rfind(), pathlib.path.stem() and rpartition() method by taking various examples

By bashiralam · 11 min read · Python

How to catch multiple exceptions in Python? [SOLVED]

In Python, we use the try and except blocks to catch and handle any kind of exceptions and errors that might occur during the execution of our program. In this …

By bashiralam · 9 min read · Python

Python get home directory [Practical Examples]

In this tutorial, we learned about Python get home directory by using various methods. We covered three different methods that we can use to get the home …

By bashiralam · 6 min read · Python

How to PROPERLY exit script in Python [3 Methods]

In this tutorial, we learned about three different methods that are used to terminate the python script including exit(), quit() and sys.exit() method by taking …

By bashiralam · 8 min read · Python