Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Why it’s hard for programmers to write a program to flatten a list?.
def flat(x):
if type(x) == type([]) and len(x)==1: return flat(x[0]) if type(x) == type([]) and len(x)>1: return flat(x[0]) + flat(x[1:]) else: return [x]
There are no comments on this comment yet.
def flat(x):