Skip to main content
The 2026 Annual Developer Survey is live— take the Survey today!
add code for python 3
Source Link
Анатолий Панин

For 2D arrays it's possible use map function:

old_array = [[2, 3], [4, 5]]
# python2.*
new_array = map(list, old_array)
# python3.*
new_array = list(map(list, old_array))

For 2D arrays it's possible use map function:

old_array = [[2, 3], [4, 5]]
new_array = map(list, old_array)

For 2D arrays it's possible use map function:

old_array = [[2, 3], [4, 5]]
# python2.*
new_array = map(list, old_array)
# python3.*
new_array = list(map(list, old_array))
Source Link
Анатолий Панин

For 2D arrays it's possible use map function:

old_array = [[2, 3], [4, 5]]
new_array = map(list, old_array)
lang-py