Pythonでコマンドライン引数取得

import sys

args = sys.argv

print(args[0])
print(args[1])
print(args[2])

リストの1つ目(args[0])は、実行ファイル名になる

ネタ元

qiita.com