import csv
import random
temp = list(range(1, 501))
random.shuffle(temp)
r1 = [temp[i*100:(i+1)*100] for i in range(len(temp) //100)]
print(r1)
random.shuffle(temp)
r2 = [temp[i*100:(i+1)*100] for i in range(len(temp) //100)]
print(r2)
with open('x.csv',mode ='w+', newline = '', encoding = 'utf-8') as f:
c = csv.writer(f)
c.writerows(r1)
c.writerows(r2)