Answers for "how to split string into list conditionally+python"

0

how to split string into list conditionally+python

import re
pattern = r'(?<!\\):'
s = 'I:would:like:to:find\:out:how:this\:works'
print(re.split(pattern, s))
Posted by: Guest on June-17-2021

Code answers related to "how to split string into list conditionally+python"

Python Answers by Framework

Browse Popular Code Answers by Language