MayureshShilotri / 26-Weeks-Of-Data-Science

Email Newsletter
354 stars 581 forks source link

Issue with an example used for Map function. Week 2. #3

Open navsx opened 5 years ago

navsx commented 5 years ago

The issue is with the following code:

`def fahrenheit(T): return ((float(9)/5)T + 32) def celsius(T): return (float(5)/9)(T-32)

temp = [0, 22.5, 40,100] F_temps = map(fahrenheit, temp)

When the output is enquired by taking the map entities in a list. It is empty

map(celsius, F_temps)

in order to see the elements

C_temps=map(celsius, F_temps) l2=[i for i in C_temps] `