H. Chase Stevens Logo

Most Common Tags

  1. programming
  2. python
  3. code
  4. philosophy
  5. evolution
  6. game design
  7. probability
  8. video games
  9. genetic algorithms
  10. government

Archives

Loading

One-Line Mode Function

posted on: Tuesday, March 13, 2012 (12:59 pm) by

More functional programming fun.

(lambda l: max([(l.count(i), i) for i in set(l)])[1])

Tags: lambda, math, programming, python, statistics, code