I have a list in which I add elements like this:
listA.append('{:<30s} {:>10s}'.format(element, str(code)))
so listA looks like this:
Paris 75
Amsterdam 120
New York City 444
L.A 845
I would like, now from this listA, to add elements to a "listB" list, without the code. I would like to do this:
for i in listA:
listB.append(i - str(code)) #that's what i want to do. The code is not good
and I want the listB to look like this:
Paris
Amsterdam
New York City
L.A
and only using listA and without having access to 'element' and 'code'
Can someone can help me ?