[Tutor] Best way to truncate strings

alan.gauld@bt.com alan.gauld@bt.com
Mon Nov 4 05:18:04 2002


Try this:

incport = '12.34.56.123:8080'
export = incport.split(':')[0]


Does that work for you?

Alan G.