'Cant add three inputs class weight while working in colab

I cant add three inputs to class weight while working in colab. The code is as below

# adding classweight
from sklearn.utils import class_weight
class_weights = class_weight.compute_class_weight('balanced',[0,1,2,3,4],train_labels)
print(class_weights)

Error image is attached Error Image



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source