0
What is the Python core practice answer?
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
8 Respostas
+ 6
Aydin Cyber , Eashan Morajkar , Nick
before we can help you, you should show us your attempt first. if you have not done a try by yourself upto now, please do so. put your code in playground and link it here.
▪︎it does not really help the OP if we give him code samples before he has done a try by himself first.
▪︎it is more helpful to give hints and guide the OP to get the task solved.
thanks you all for helping us!
+ 4
Oh my god, what's with all these dislikes on Eashan Morajkar and my examples
+ 4
I thought this section was meant for “discussion” instead of “judgement”, with all due respect.
+ 3
If you're gonna go about rules, stop mentioning people with anything that's not programming related because they didn't come here to get a lecture on how to live a life when they came here to learn to code
It is somewhat annoying, aggravating and harassing to be mentioned in situations like this when it is uncalled for
Maybe spend more time appreciating people's efforts instead of picking out any wrongs that you spot?
+ 1
I'm not sure what “input()” would return if nothing is given, but I guess you could try something like:
inputs = []
while True:
#if input() is null or something
break
inputs.append(input))
output = "-".join(inputs)
Not an expert on python but I hope this helps
0
Aydin Cyber:
inputs = []
i = ""
while True:
i = input()
if i=="":
inputs.pop()
break
inputs.append(i)
inputs.append("-")
for i in inputs:
print(i,end="")
0
Thanks ♥️♥️♥️♥️♥️
0
You're welcome