texts = ['#1 - New York', '#4 - London']for myString in texts: print( myString, '=>', myString.split(' - ', 1)[-1] )
Standard input is empty
#1 - New York => New York #4 - London => London
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!