Created
March 29, 2016 03:36
-
-
Save zigzackey/422c4f5f089ea5308dda to your computer and use it in GitHub Desktop.
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
# endを指定しない場合は,"\n"がデフォルト.最後に改行が行われる | |
print("hoge") | |
# endに空文字を指定すると,改行されない | |
print("hoge", end="") | |
# print()関数の引数は,複数に対応している.sepを指定しない場合,デフォルトでは結合文字は半角スペース. | |
print("foo", "bar") | |
#sepを指定することで,結合文字を変更することができる | |
print("foo", "bar", sep=",") | |
#勿論,sepとendは同時に指定可能です | |
#fileで指定したファイルオブジェクトに出力可能です | |
print("hogehoge", file=sys.stdout) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment