Случайный выбор из списка без повторения 3 символа. Пишет ошибку . Что делать?
a = [1,0,0,0,0,1,0,0,0,0,1,1,0,1,0,0,0,1,0,1,0,1,1,0,0,1,1,0,1,0,0,1,1,0,0,1,0,0,0,1,0,0,0,0,0,1,0,1,1,1,0,0,1,1,0,0,1,0,0,1,1,1,0,0,1,0,1,1,0,1,0,0,1,1,1,0,0,1,0,1,0,0,1,0,0,0,1,0]
b = int(input('Сколько чисел '))
import random
random.shuffle(a)
p = 0
qwe = len(str(a))
qwe = qwe // b
wer = []
for i in range(1,qwe):
wer.append(i)
print(wer)
while qwe > 0 :
c = random.sample(wer,b)
n1 = c[0]
n2 = c[1]
n3 = c[2]
del wer[n1]
del wer[n2]
del wer[n3]
qwe -= 1
print(c)