Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

A map lambda example is what I had in mind when reading the article. I'm not a big fan of the temporary variables, though.

Admittedly the example below is not a perfect solution, but that's where I thought the article was heading when splitting that code over multiple lines for readability.

  map(
      lambda x: x.split('=')[1],
      (url
          .split('?')[1]
          .split('&')[-3:]
      )
  )
Is this still too unreadable or more messy?


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

Search: