teratail header banner
teratail header banner
質問するログイン新規登録

回答編集履歴

1

Update

2021/12/07 02:32

投稿

melian
melian

スコア21265

answer CHANGED
@@ -16,6 +16,9 @@
16
16
 
17
17
  import sys, io
18
18
  sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
19
+ # print(type(sys.stdout)) # => <class '_io.TextIOWrapper'>
20
+ # print(sys.stdout.encoding) # => utf-8
21
+ # sys.stdout.encoding = 'utf-8' # => AttributeError: readonly attribute
19
22
 
20
23
  today_date = datetime.datetime.today()
21
24
  print(today_date)