objects = [2, 3.14, "hello", [2, 3, 5], [2, 3, 5]] for obj in objects: print(f"{obj}の型は{type(obj)}、IDは{id(obj)}") # プログラム8-5(オブジェクトのID)