fork download
  1. c=input()
  2. d1=0
  3. d2=d1
  4. c1=0
  5.  
  6.  
  7. for k in range(len(c)):
  8. if c[k]=="/" or c[k]=="//":
  9. d2=d1
  10. d1=k+1
  11. print(c[d2:d1-1])
  12.  
  13. print(c[d1:])
Success #stdin #stdout 0.02s 9136KB
stdin
C:/Photo/2013/Pokhod/vasya.jpg
stdout
C:
Photo
2013
Pokhod
vasya.jpg