Last active
June 4, 2022 04:55
-
-
Save froop/d1305c49abccad720b19b8c22a2ead14 to your computer and use it in GitHub Desktop.
[Python] 大量行テキスト出力
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
FILE_SIZE = 10485760 | |
LINE_TEXT = '1234567890' * 10 | |
write_size = 0 | |
while write_size < FILE_SIZE: | |
print(LINE_TEXT) | |
write_size += len(LINE_TEXT) + 1 |
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
import datetime | |
for i in range(1000000): | |
print('%08d %s %s' % (i, datetime.datetime.now().time(), '1234567890'*10)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment