A=[] B=[] C=[] for i in range(9): if (i+1) % 3 == 1: A.append(i+1) elif (i+1)%3==2: B.append(i+1) else: C.append(i+1) print(f'{A}') print(f'{B}') print(f'{C}')
To embed this project on your website, copy the following code and paste it into your website's HTML: