I just want to ask if how should I pop certain elements inside the list.
Let's say I have this list:
c = ['123','456','789']
When I type this:
print c[0][0]
It prints a value '1'
,
And somehow I want to delete the first element of the first value.
So that the output will be:
c = ['23','456','789']
But I have a problem in using pop()
.
I tried this but no luck:
c.pop(0, 0) # takes only one argument
Or
c[0].pop(0) # string doesn't have an attribute pop
Is there a way to solve my dilemma?
If this problem has a duplicate, please let me know.