0
Why not write all the numbers from the list ..? (recursive)
"Runs and write the list with a recursive function" The function first writes 1 and then 0 from the list from random import randint def runsList(A): if (len(A) <= 1): return if A[0] == 1: print (A[0]," ",end="") runsList(A[1:]) if A[0] == 0: print (A[0]," ",end="") A = [randint(0,1) for i in range(10)] print (A) recorreList(A) https://code.sololearn.com/c558nT5JlRz0
1 Answer
0
try
if len(A) < 1: