Advertisement
user_137

Print Options

Feb 11th, 2013
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.37 KB | None | 0 0
  1. # Heres a python 2 version:
  2. print "%s%d" % ('2+3=',5)
  3.  
  4. # or a stranger variation
  5. print "{}{}".format("2+3=",5)
  6. # On this one you need as many {} as variables, and the separator you put
  7. # between the {} and the next {} is the separator between your output variables.
  8.  
  9. # This little python 3 to 2 trick also works:
  10. from future import print_function
  11. print ("this", 5, sep='')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement