+ 1
something is not right
print("1,2,3,4".join("/")) output: /
4 Answers
+ 4
join stops before the last string so "1,2,3,4" won't join this("/") if it was "1,2,3,4".join("//") then it would have joined in between those two slashes
+ 2
Try:
print("/".join(("1", "2", "3", "4")))
+ 1
What output are you look for?
+ 1
print("/".join("1,2,3,4".split(',')))
# or
print("1,2,3,4".replace(',', '/'))
Hot today
Тренажер кода
1 Votes
Sololearn Bugged??
1 Votes
help my code does not iterate
0 Votes
How to install and update ?
0 Votes
What's wrong with this??
0 Votes