Hacker News new | past | comments | ask | show | jobs | submit login

From the Haskell snippet, f is just "map read" specialized for lists of Integers, so inlining it would read like this :

  let list = map read (words contents)
The equivalent Python is basically this:

  list = [int(word) for word in contents.split()]
I'm just writing this for the benefit of others here.



Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: