Skip to main content

One post tagged with "Coding Question"

View All Tags

· One min read
Kaustubh Kulkarni

Adding Words

You need to write a function that takes multiple words as its argument and returns a concatenated version of those words separated by dashes (-). The function should be able to take a varying number of words as the argument.

Sample input

this is great

Sample Output

this-is-great Recall, using

def concatenate(*args):

print(concatenate("I", "love", "Python", "!"))