isaacg1 / pyth

Pyth, an extremely concise language. Try it here:
https://pyth.herokuapp.com/
MIT License
263 stars 57 forks source link

Golfed way to remove empty lists in multidimensional list #171

Closed benstopics closed 8 years ago

isaacg1 commented 8 years ago

What about fT?

isaacg1 commented 8 years ago

If that's not what you're looking for, can you give a test case?

benstopics commented 8 years ago

[[],[],[],[],[],[1],[],[]] => [1]

isaacg1 commented 8 years ago

In that case, try s or .n, the two flatten functions.

benstopics commented 8 years ago

Nice! Thanks. New to Pyth, but great language.