Suppose I have a list of tuples as follows:
listA = [ (B,2), (C,3), (D,4) ]
I would like to add another tuple (E,1)
to this list. How can I do this?
And more specifically, I would like to add this tuple as the 1st tuple in the list so that I get:
newList = [ (E,1), (B,2), (C,3), (D,4) ]
I am using Python 2.7.
Thanks in advance!