DRY(Don’t Repeat Yourself) を聞いたことがありますか? 同じコードを何度もコピー&ペーストするのではなく、 関数としてまとめて再利用する のがプロのやり方です。 たとえば… 「区切り線を表示するコード」を100回コピペする代わりに、 print_line() 関数を ...
# def is a keyword that we use to define the function. # addition is a function name here, a, b are a value or parameter. # Observe the indentation(spacing) of the ...