我在Python 2.7中有这个代码我一直在努力,而且我被卡住了.我试图从去
["bob","sally","jim"])
到
'bob<>sally<>jim'
这是我到目前为止所拥有的.
def long_winded(my_str):
result = []
for i in my_str:
result += i + "<>"
return result
print long_winded(["sally","bob","jim"])
Run Code Online (Sandbox Code Playgroud)