Skip to navigation
Remove last python substring by a separator
25.07.17
s = 'foo-bar-none' a = s.split('-') del a[-1] ns = '-'.join(a) print(ns)
http://www.tutorialspoint.com/python/string_join.htm
Reply
Anonymous
Information Epoch 1779173457
Make each program do one thing well.
Home
Notebook
Contact us