Skip to content

Instantly share code, notes, and snippets.

@fuzeman
Created March 30, 2013 17:14
Show Gist options
  • Save fuzeman/5277507 to your computer and use it in GitHub Desktop.
Save fuzeman/5277507 to your computer and use it in GitHub Desktop.
Element Tree - One-line element creation with text attribute.
def make_element(name, text):
elem = et.Element(name)
elem.text = text
return elem
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment