Created
July 9, 2017 14:20
-
-
Save WebSamuraiDaisuke/ad8bdfb65632bdce79375c36548a2bbc to your computer and use it in GitHub Desktop.
Python3に移行して戸惑ったことのメモ
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
i = 0 | |
for i in range(1,11): | |
with open("numbers.txt", 'a') as f: #with構文という便利な物がある。オプションのaは追記を意味する | |
f.write('hello, world\n') #文末に\n(macbookだとalt+¥)を入れると改行になる |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment