from array import array tab = array('i', range (0, 20)) for i in range(0, 20): tab[i] = i**2%17 for value in tab: print (value)