Write a program that, for a given string s, removes from it a sequence of characters located between two commas

Write a program that, for a given string s, removes from it a sequence of characters located between two commas (it is assumed that there are exactly two commas in the string)

Pascal:
var
m: string;
begin
readln (m);
writeln (m.Remove (m.IndexOf (‘,’) + 1, m.LastIndexOf (‘,’) – m.IndexOf (‘,’) – 1));
end.



One of the components of a person's success in our time is receiving modern high-quality education, mastering the knowledge, skills and abilities necessary for life in society. A person today needs to study almost all his life, mastering everything new and new, acquiring the necessary professional qualities.