0
degreechemeを姓でアルファベット順にソートする必要のある小さな関数を作成しています( "2人の姓が同じ場合はファーストネームも使用します)。私は "TypeError: 'NoneType'オブジェクトに添字をつけることはできません。Python -Function - TypeError: 'NoneType'オブジェクトにサブスクリプトがありません
私はこのエラーを以前に見たことがないので、それが何を意味するかはわかりません。
def degreescheem(listing,x):
printed=False
temporlist=[]
for i in listing:
if i[3] == x :temporlist.append(i)
slist=sorted(temporlist,key=lambda s:(s[4],s[5]))
for j in slist :
informationsformat(j)
printed = True
if not printed: print("no",x)
も、それはここでエラーがあると言うならば、私[3] == X:temporlist.append(I)が、私は何かを見つけたカント!
あなたの 'listing'には何がありますか? 'degreescheem'関数をどのように呼びますか? – Lafexlos