Slide 11
Slide 11 text
1.5. お
すすめ
ポイント2: コードブロック
のシンタックスハイライト
と行番号表示
がで
きる
ソースコードやコマンド
の実行結果など
のコードブロック
を綺麗に表示で
きます
Pythonソースコード
の表示例 :
before
4 f = open(test_path, "a", encoding="utf-8")
5 f.write("this is new append line\n")
6 f.close()
after
4 with open(test_path, "a", encoding="utf-8") as f:
5 f.write("this is new append line\n")
特徴
行番号
の表示がで
きるため、行番号で
の意思疎通で
きて便利で
す
着目
して欲
しい行
を強調で
きます ( 上記
の例では 4行目以降 )
画像ではなくテキストな
ので、文字列
のコピーや検索も可能で
す
上記
のように、Gridレイアウト
を使うこ
とで左右で比較、
のような表現も可能で
す
1 import os
2 test_path = os.path.join("data", "data-01.txt")
3
1 import os
2 test_path = os.path.join("data", "data-01.txt")
3