-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,333
  • 1
  • 14
  • 30
erez
  • 339
  • 1
  • 4
  • 17

1 Answers1

0

folders = Path.split('\')

It will return you the required list of the folders

Waqar
  • 95
  • 2
  • 9