Skip to content

Instantly share code, notes, and snippets.

@omgjlk
Created May 9, 2018 21:32
Show Gist options
  • Save omgjlk/42e23bb63bd472cfbc06c645ea3140c1 to your computer and use it in GitHub Desktop.
Save omgjlk/42e23bb63bd472cfbc06c645ea3140c1 to your computer and use it in GitHub Desktop.
python split oddness
In [84]: xmlconfig = """
....: <domain type='kvm'>
....: <name>omgjlk</name>
...
In [93]: xmlconfig
Out[93]: "\n<domain type='kvm'>\n <name>omgjlk</name>\n..."
In [134]: xmlconfig.split('<domian')
Out[134]: ["\n<domain type='kvm'>\n <name>omgjlk</name>\n...."
wtf??
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment