Q:

How to delete the first element of a row so that the whole row deleted from a list?

My list looks as follow:
items = []

a = "apple", 1.23

items.append(a)

b = "google", 2.33

items.append(b)

c = "ibm", 4.35

items.append(c)

Now  I will just remove the row of "apple" by just giving the name of "apple".
How to do?

A:

You can convert items into a dictionary, delete the entry with key apple and return the dictionary items:
>>> items
[('apple', 1.23), ('google', 2.33), ('ibm', 4.35)]
>>> d = dict(items)
>>> del d['apple']
>>> items = d.items()
>>> items
[('ibm', 4.35), ('google', 2.33)]

In python 3, you should cast d.items with list as .items() returns a dict_items object which is iterable but not subscriptable:
>>> items = list(d.items())

A:

I suggest that you use a proper data structure. In your case, a dict will do the trick.
items = {"apple": 1.23, "google": 2.33, "ibm": 4.35}

To delete, use:
items.pop("apple", None)

