Pythonの勉強を続けています。 今回は👉 大小比較でエラーになる理由 を学びました。 一見普通のコードなのに 👉 突然エラーになる 初心者がよくハマるポイントです。 まずはこのコード class Person: def __init__(self, age): self.age = agep1 = Person(20)p2 = Person(30)print(p1 < p2) 実行すると… TypeError: '<' not supported between instances of 'Person' and 'Person' 👉 エラー発生 なぜ? Pythonは 👉 オブジェクトの…