use join
This commit is contained in:
parent
dd2bbb5879
commit
e4495ccb9f
1 changed files with 4 additions and 6 deletions
|
@ -1,11 +1,9 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def str2list(s):
|
def str2list(string):
|
||||||
return s.split(",")
|
return string.split(",")
|
||||||
|
|
||||||
def list2str(l):
|
def list2str(mylist):
|
||||||
s = l[0]
|
s = ",".join(mylist)
|
||||||
for it in l[1:]:
|
|
||||||
s += ',' + it
|
|
||||||
return s
|
return s
|
Loading…
Add table
Add a link
Reference in a new issue