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? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -