+ 1

nums = (11, 22, 33) nums = tuple(map(lambda x: x+5, nums)) print(nums) this shud give error bcoz tuple is imutable but no error

25th Feb 2017, 9:16 AM
adarsh
adarsh - avatar
2 Réponses
+ 2
No: it should give error if tuple wasn't iterable... being imutable is not a problem for the map() function ^^
25th Feb 2017, 9:55 AM
visph
visph - avatar
0
May be map returns brand new tuple.
25th Feb 2017, 9:34 AM
Kilrog
Kilrog - avatar