Untitled

Anonymous
Plain Text
05/25/2023 1:54 PM
380 B
25
Indexable
Never
string = "jdjdi.jdjd,jdiiiji.hh,fjdidbi.hhjd"

split_parts = string.split(',')
replaced_parts = []
for part in split_parts:
    dot_index = part.find('.')
    if dot_index != -1:
        replaced_part = part[dot_index+1:]
        replaced_parts.append(replaced_part)
    else:
        replaced_parts.append(part)

replaced_string = ','.join(replaced_parts)
print(replaced_string)
Editor is loading...