Created
January 21, 2015 03:57
-
-
Save Rachitlohani/3ec346aa4dca0975aa1f to your computer and use it in GitHub Desktop.
python
This file contains hidden or 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
print("Total score for %s is %s " % (name, score)) | |
Or use the new-style string formatting: | |
print("Total score for {} is {}".format(name, score)) | |
Or pass the values as parameters and print will do it: | |
print("Total score for", name, "is", score) | |
If you don't want spaces to be inserted automatically by print, change the sep parameter: | |
print("Total score for ", name, " is ", score, sep='') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment