Advertisement
here2share

# at_nth_occurence.py

Oct 27th, 2016
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.14 KB | None | 0 0
  1. # at_nth_occurence.py
  2.  
  3. def oSplit(z,nth):
  4.     z=z.split('_')
  5.     z='_'.join(z[nth:])
  6.     return z
  7.    
  8. print oSplit('xyz_1st_2nd_3rd_4th_5th_6th',4)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement