Python how to convert number to integer in a list?

Hi
I am trying to get (with python) a list with an integer result (1+10,2+11 etc) just like with the code block
i can get a result with just the last one in a list but not the hole list
what is wrong?

Hello Nico,

In your first 2 loops you’re trying to create an int (A or B) every time you loop over the input. It’s not creating a new list for you. Here’s how you could do it;

2 Likes

thanks

@T_Pover is on the right path but i would modify where the int is added to get away from having two additional temporary lists to manage and do it as the below image.

Exactly!
And for another slight speed increase: :slight_smile:

Thanks Guys