From anonymous, 6 Years ago, written in Python.
This paste is a reply to python string formatting from The Compiler
- view diff
Embed
  1. >>> me = "Compiler"
  2. >>> you = "longneck"
  3. >>> "{0} shows {1} how this works.".format(me, you)
  4. 'Compiler shows longneck how this works.'
  5.  
  6. great! now back to our script:
  7.  
  8.        js = """   #define var «js» with "multiline-string"
  9.        document.activeElement.value = '{0}' #something plugin-internal I think
  10.        """.format(password).strip()  #format the string """ with password and strip
  11.         return(js)  #return variable js (which is still defined with """)
  12.  
  13. i gseh irgendwie nid wo dass die zyle:
  14. """.format(password).strip()
  15. e Ifluss uf d variable "js" het (und js isch jo die einzig wo zruggäh wird)

Replies to RE: python string formatting rss

Title Name Language When
RE: RE: python string formatting anonymous python 6 Years ago.