メインコンテンツへスキップ

"string index out of range" error within quicksum

ユーザーの入力を待っています。

コメント

1件のコメント

  • Jaromił Najman
    • Gurobi Staff Gurobi Staff

    Hi Abhishek,

    Could you please post a minimal reproducible example? It is very hard to provide useful help with this little of information.

    You could try to isolate the error by running a \(\texttt{for}\)-loop for the \(\texttt{position[i] == 'Defender' part only}\)

    for i in players:
    print(i)
    print(position[i])
    if position[i] == 'Defender':
    print("In if-clause")

    and see what happens.

    Best regards, 
    Jaromił

    0

サインインしてコメントを残してください。