Помогите перевести с Паскаля на Python:
var
k, s: string;
n: integer;

begin
read(s);
n := 100;
while n > 0 do
begin
n := pos('/', s);
if n > 0 then
begin
k := copy(s, 1, n - 1);
writeln(k);
delete(s, 1, n);
end else
n := 0;
end;
k := copy(s, n, length(s));
writeln(k);
end.
Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Answers & Comments


Copyright © 2024 SCHOLAR.TIPS - All rights reserved.