Answers for "list split character"

0

list split to string

# instead of regular split
>> s = "a,b,c,d"
>> s.split(",")
>> ['a', 'b', 'c', 'd']

# ..split only on last occurrence of ',' in string:
>>> s.mysplit(s, -1)
>>> ['a,b,c', 'd']
Posted by: Guest on May-30-2021

Code answers related to "list split character"

Python Answers by Framework

Browse Popular Code Answers by Language