import random import sqlite3 random.seed() brothers = ["Guillaume", "Geoffroy", "Thibaut", "Bertrand", "Enguerrand"] random.shuffle(brothers) conn = sqlite3.connect('famille.db') c = conn.cursor() for i in range(5): c.execute('UPDATE users SET kado=? WHERE user_name=?', (brothers[i], brothers[(i + 1) % 5])) conn.commit() conn.close()