Word Replacement

Write a function replace(ws, x, y) that given a list of words ws, and
two words x and y, replaces all occurrences of x in ws with y. The
function must return two lists: The original list ws and the modified
list with the replaced elements (if any).

Problem information

Author: ProAl1 professors

Generation: 2026-01-25T16:48:47.096Z

© Jutge.org, 2006–2026.
https://jutge.org
