Hi guys I'm having the current problem:
list_a = [('abc d',1), ('abc d',2) ,('acb e',3) ,('b',1),('b',2),('b',3)]
from list_a, I am trying to build a function that would return the following output...
Essentially I want to keep all [0] values that start with the string 'a' and make modifications to its respective [1]'s.
The modification being a simple [1] x 2 ...
('abc d',1) --> ('abc d',2)
('abc d',2) --> ('abc d',4)
('act d',3) --> ('abc d',6)
Keeping the other pairs as they were since they start off with a 'b' in the [0] position.
Desired Output:
[('abc d',2), ('abc d',4) ,('acb e',6) ,('b',1),('b',2),('b',3)]
Thank you in advance :)