Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
class database(object): def __init__(self): self.l = [] def insert(self, e): for i in range[len(self.l)]: if i == e: return self.l.append(e)
誰かが助けることができるバインドされていないメソッドを私に与えるのはなぜですか?
理由はあなたのタイプミスのためです:
range[len(self.l)]
する必要があります
range(len(self.l))
()関数の呼び出しには括弧を使用します。ブラケット[]は、リストやスライスなどのその他の機能に使用されます。
()
[]