(May-03-2020, 09:44 AM)syno7878 Wrote: I tried your code and I got the following error message. I'm using Python 2.7:Stop using Python 2.7 is not supported anymore,will not be maintained at all past 2020.
f-string that i use was new in Python 3.6 -->
For python 2 use
.format
f = open("password.txt", "r") s = f.read() f_out = open("password2.txt", "wt") for count in range(1900,2021): f_out.write('{}{}\n'.format(s, count)) f_out.close()
Output:password1900
password1901
password1902
password1903
password1904
password1905
.....