x = ["slithy",[7,10,12],2,"tove",1]
x[0][:3] = 'fea'
print(x)
TypeError: 'str' object does not support item assignment
x = ["slithy",[7,10,12],2,"tove",1]
x[0][:3] = 'fea'
print(x)
TypeError: 'str' object does not support item assignment
You are attempting to modify the 0th element of the list, which is a string.
You would see the same error with this code
s = "slithy"
s[:3] = 'fea'
The reason for the error is that strings are immutable in Python and as such cannot be modified.
In Python strings are immutable. If your expected result is x = ["slifea",.....], this code is wrong and returns that error.