Check sibling questions

What is the use of split function of os.path module?

 

Answer:

The split( ) method is used to split the path name into a pair, head and tail .

Here, 

  • tail is the last path name component 
  • head is everything leading up to that.

Syntax:

os.path.split(path)

Introducing your new favourite teacher - Teachoo Black, at only ₹83 per month

CA Maninder Singh's photo - Expert in Practical Accounts, Taxation and Efiling

Made by

CA Maninder Singh

CA Maninder Singh is a Chartered Accountant for the past 12 years. He also provides Accounts Tax GST Training in Delhi, Kerala and online.