from machine import Pin
import time as delay
A = Pin(04,Pin.OUT)
B = Pin(18,Pin.OUT)
C = Pin(19,Pin.OUT)
D = Pin(21,Pin.OUT)
E = Pin(22,Pin.OUT)
F = Pin(02,Pin.OUT)
G = Pin(15,Pin.OUT)
lst = [A,B,C,D,E,F,G]
numlst=[[A,B,C,D,E,F],
[B,C],
[A,B,G,D,E],
[A,B,C,D,G],
[F,G,C,B],
[A,F,G,C,D],
[A,C,D,E,F,G],
[A,B,C],
[A,B,C,D,E,F,G],
[A,B,C,D,F,G]]
for i in range(7):
lst[i].value(0)
delay.sleep(.8)
lst[i].value(1)
for i in range(len(numlst)):
for j in range(len(numlst[i])):
numlst[i][j].value(0)
delay.sleep(1)
for k in range(len(lst)):
lst[k].value(1)
while(1):
n=int(input("Enter any number under 1 digit : "))
for i in range(len(lst)):
lst[i].value(1)
for i in range(len(numlst[n])):
numlst[n][i].value(0)