0 out of 464 challenges solved
Write a function `tuple_to_string(tup)` that takes a tuple of characters as input and returns a string formed by concatenating all the characters in the tuple. #### Example Usage: ```python [main.nopy] print(tuple_to_string(('h', 'e', 'l', 'l', 'o'))) # Output: "hello" print(tuple_to_string(('P', 'y', 't', 'h', 'o', 'n'))) # Output: "Python" print(tuple_to_string(('1', '2', '3'))) # Output: "123" ``` #### Constraints: - The input tuple will only contain single-character strings. - The function should return a string.
def tuple_to_string(tup): """ Convert a tuple of characters into a string. Args: tup (tuple): A tuple containing single-character strings. Returns: str: A string formed by concatenating the characters in the tuple. """ # Your code here pass