+ 1
You need to write a function that takes multiple words as its argument and returns a concatenated version of those words separat
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
4 odpowiedzi
+ 4
Nallamala satish , here are some hints how you could do this task:
- use input to get a sentence with multiple words. store it in a variable
- split this sentence with function split() at word boundaries and store it in s list
- output this list by joining all elements of the list, using "-" as a separator
that's all - happy coding!
0
my_string= input().split()
my_string='-'.join(my_string)
print(my_string)
0
its dhowing none after the putput