import numpy as np regnr = np.loadtxt('bilnr.txt', dtype='str') for i in range(len(regnr)): bokstaver = regnr[i] print(bokstaver[0:2])