-1

I have a case like this:

Path = 'C:\Intel\ExtremeGraphics\CUI\Resource'

I want to split this string to list with the string folders names:

['C:', 'Intel', 'ExtremeGraphics', 'CUI, 'Resource']

How can I do that in the shortest way?

Chrono
  • 1,433
  • 1
  • 16
  • 33
erez
  • 399
  • 1
  • 6
  • 17

1 Answers1

0

folders = Path.split('\')

It will return you the required list of the folders

Waqar
  • 93
  • 1
  • 2
  • 9