I'm having trouble figuring out how to remove something from within a nested list.
For example, how would I remove 'x' from the below list?
lst = [['x',6,5,4],[4,5,6]]
I tried del lst[0][0], but I get the following result:
TypeError: 'str' object doesn't support item deletion.
I also tried a for loop, but got the same error:
for char in lst:
del char[0]
charas something special to Python as it is coloured blue. There is no built-in function calledchar, neither it's a keyword.//operator as a comment. The operator is going to be widely used in the future as Python3 has been released and it is becoming more and more popular. Stack Overflow should really work on it. More: meta.stackexchange.com/questions/81906/…