tuu = {'chat': []}
....
tuu[chat].append(a)
for i in range(5):
https://docs.python.org/3/library/functions.html#f... In [3]: from random import randint
In [4]: def t(list_len=10):
list_ = []
while len(list_) < list_len:
r = randint(0, list_len * 10)
if r not in list_: list_.append(r)
return list_
...:
In [5]: t()
Out[5]: [34, 21, 49, 40, 81, 78, 95, 63, 31, 29]
In [6]: t(20)
encrypter = crypto.new(key, AES.MODE_CBC, IV)
ciphertext_blocks = [encrypter.encrypt(message_block) for message_block in message_blocks]