python - add 2 to list [[23,34],[34,23]] -


i have list looks [[23,34],[43,23]] , want add int each number if want add 2 list becomes [[25,36],[45,25]]

>>> nums = [[23,34],[43,23]] >>> [[y + 2 y in x] x in nums] [[25, 36], [45, 25]] 

Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

ios - iPhone/iPad different view orientations in different views , and apple approval process -

Shrink a YouTube video to responsive width -