Skip to content

Instantly share code, notes, and snippets.

@WebSamuraiDaisuke
Created July 9, 2017 14:20
Show Gist options
  • Save WebSamuraiDaisuke/ad8bdfb65632bdce79375c36548a2bbc to your computer and use it in GitHub Desktop.
Save WebSamuraiDaisuke/ad8bdfb65632bdce79375c36548a2bbc to your computer and use it in GitHub Desktop.
Python3に移行して戸惑ったことのメモ
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