python split string by last ocurence of a char code example Example: python split only last occurrence of a character s.rsplit(',', 1) s.rpartition(',')