from random import randint
a = [1, 2, 3, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
b = []
if len(a) <= 11:
for value in a:
while value in b:
value = randint(1, 11)
b.append(value)
print b
else:
print "A lista 'a' deve conter no máximo 11 elementos."
ZnJvbSByYW5kb20gaW1wb3J0IHJhbmRpbnQKCmEgPSBbMSwgMiwgMywgNCwgMSwgMSwgMSwgMSwgMSwgMSwgMSwgMSwgMSwgMV0KYiA9IFtdCgppZiBsZW4oYSkgPD0gMTE6CiAgICBmb3IgdmFsdWUgaW4gYToKICAgICAgICB3aGlsZSB2YWx1ZSBpbiBiOgogICAgICAgICAgICB2YWx1ZSA9IHJhbmRpbnQoMSwgMTEpCiAgICAgICAgYi5hcHBlbmQodmFsdWUpCgogICAgcHJpbnQgYgplbHNlOgogICAgcHJpbnQgIkEgbGlzdGEgJ2EnIGRldmUgY29udGVyIG5vIG3DoXhpbW8gMTEgZWxlbWVudG9zLiI=