A Python function that repeats a shorter string to match the length of a longer string.
This challenge involves working with string operations to meet certain conditions, particularly adjusting the lengths of strings. Your task is to develop a function that takes two arguments, `s1` and `s2`. The function should return a new string, created by repeating the shorter input string until its length is equal to the length of the longer string. If the repetitions cause the length to exceed the longer string's length, the extra characters should be discarded. ### Parameters - `s1` (str): The first string provided to the function. - `s2` (str): The second string provided to the function. ### Return Value - The function returns a new string, whose length is equivalent to the length of the longer input string. ### Examples ```python # 'ab' is shorter, repeat it until it matches the length of 'abcdefg' solution("abcdefg","ab") # Returns: "abababa" # 'forest' is shorter, repeat it until it equals the length of 'ingenius' solution("ingenius","forest") # Returns: "forestfo" # 'clap' is shorter, repeat it until to matches the length of 'skipping' solution("clap","skipping") # Returns: "clapclap" ```