does anybody know how to delete all characters behind a specific character??
like this:
http://google.com/translate_t
into
<
if you're asking about an abstract string and not url you could go with:
>>> astring ="http://google.com/translate_t" >>> astring.rpartition('/')[0] http://google.com