Python Programming - Functions - Discussion

Discussion Forum : Functions - General Questions (Q.No. 17)
17.
What will be the result of the following code snippet?
def concatenate_strings(*args):
    return ''.join(args)

result = concatenate_strings('Hello', ' ', 'World!')
print(result)
'Hello World!'
'Hello, World!'
('Hello', ' ', 'World!')
Error
Answer: Option
Explanation:
The function concatenate_strings takes variable positional arguments and joins them into a single string.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.