greet = "こんにちは、Python!" index = int(input("インデックスは?")) char = greet[index] print(f"「{greet}」のインデックス{index}の文字は「{char}」です。") # プログラム8-16(インデックスで文字を指定)