Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python split string keep delimiter

line = "<html><head>"
d = ">"
s =  [e+d for e in line.split(d) if e]
print(s)
#Output:
#["<html>", "<head>"]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #split #string #delimiter
ADD COMMENT
Topic
Name
2+3 =