Created
July 3, 2015 12:24
-
-
Save harunyasar/c5148d7e49636993d4a0 to your computer and use it in GitHub Desktop.
String formatting with % and stripping
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a = " Lorem ipsum" | |
b = " " | |
("%s %s" % (a , b)).strip() # 'Lorem ipsum' | |
"%s %s" % (a , b) # ' Lorem ipsum ' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment