- 1
Help me to solve a python program
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. Recall, using *args as a function parameter enables you to pass an arbitrary number of arguments to that function.
6 Respuestas
+ 3
If you don't want to use "join", here is an alternate solution using native loop.
https://code.sololearn.com/c1CqwQVKc6U6/?ref=app
0
Give it a shot and post the code! We'd be glad to help
0
Yea show your attempt
0
def concatenate(*args):
print('-'.join(args))
print(concatenate("I", "love", "Python", "!"))
0
I got the answer
0
i got answer