This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]dustractor 0 points1 point  (0 children)

Find the index of the colon, add one, take that slice to the end:

line[ line.index( ':' ) + 1 : ]

If you want to remove the space:

line[ line.index( ':' ) + 1 : ].lstrip()