0

python-- please explain the logic.

def to_upper(k): return k.upper() x=['ab','cd'] print(list(map(upper,x)))

15th Jun 2018, 4:48 AM
Sashank Reddy
Sashank Reddy - avatar
3 Answers
+ 5
Isn't your code supposed to look like this (the last line is different): def to_upeer(k): return k.upper() x=['ab','cd'] print(list(map(to_upeer, x)))
15th Jun 2018, 5:00 AM
Paul
Paul - avatar
0
yes x should be there. thanks. typo. can u explain now? maps and whole logic
15th Jun 2018, 5:01 AM
Sashank Reddy
Sashank Reddy - avatar
0
thanks
15th Jun 2018, 5:33 AM
Sashank Reddy
Sashank Reddy - avatar