BrokenLegMike

Truncating String in Python

Discussion created by BrokenLegMike on Jun 10, 2011
Latest reply on Jun 13, 2011 by BrokenLegMike
I have poured through the internet trying to find a way to truncate a string in Python and I am at a wall.

I want to truncate a string like this:

My_String_Needs_to_be_truncated_12May11_mm

I want to truncate this portion "_12May11_mm" so that I have "My_String_Needs_to_be_truncated" remains.

Thanks for any help!
Mike

Outcomes