Example Program: Username Creation Usernames are first initial and 7 chars of lastname (e.g. jzelle). inf = open("names.dat", "r") outf = open("logins.txt", "w") for line in inf: first, last = line.split() uname = (first[0]+last[:7]).lower() outf.write(uname+'\n') inf.close() outf.close() Note use of string methods (Python 2.0 and newer)