How to split path to separate folder from file name in Python

1 Answer

0 votes
from os import path

s = r"d:\c-sharp course"

result = path.split(s)

print(result[0])
print(result[1])


'''
run:

d:\
c-sharp course

'''

 



answered Nov 12, 2018 by avibootz
...