def triangle(): L = [1] while True: yield(L) # 复制L T = L[:] n = 1 while n < len(T): L[n] = T[n - 1] + T[n] n = n + 1 L.append(1)
这个好理解
[s.lower() for s in L if isinstance(s, str)]
Sign in to make a reply
中原胡侃