Python split string tetap pembatas
line = "<html><head>"
d = ">"
s = [e+d for e in line.split(d) if e]
print(s)
#Output:
#["<html>", "<head>"]
Ugliest Unicorn
line = "<html><head>"
d = ">"
s = [e+d for e in line.split(d) if e]
print(s)
#Output:
#["<html>", "<head>"]