Q29Multiple correct4 Marks11 Dec 2022
A function compress uses a string data and a list flag of the same size and returns a substring of characters from data if the corresponding value in flag is set to 1, otherwise it is skipped.
Select correct implementation of the function compress.