Skip to content

Instantly share code, notes, and snippets.

@emerak
Created February 6, 2013 01:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save emerak/4719324 to your computer and use it in GitHub Desktop.
Save emerak/4719324 to your computer and use it in GitHub Desktop.
String Formatting - LearnPython.org
data = ("John", "Doe", 53.44)
format_string = "Hello %s %s. Your current balance is %.2f$."
print format_string % (data[0],data[1],data[2])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment