In a list of string write a program that print a single string containing all elements of l.concatenate all elements of list concatenated together with a hyphen in between two elements
Answers
Answered by
0
Answer:
Here is you answer
Explanation:
lst = eval (input("Enter a List :-"))
string = ""
for i in range (len(lst)) :
if i == len(lst) - 1 :
string += lst[i]
else :
string = string + lst[ i ] + "-"
print ("New word is :- ", string)
Similar questions