So, basically im trying to create a code that reads lines from a text file (lets say the text file is named "passwords.txt") and tests if the password is alphanumerical. If it is alphanumerical, the code will print out "[the password from the line] is a valid password" and if not it will print out "[password from the line] contains invalid characters." ?
I have written some code example.
file = open("passwords.txt", "w")
file.write("5345m345ö34l\nno2no123non4\nnoq234n5ioqw#%\n%#""SGMSGSER\ndoghdp5234\nsg,dermoepm\n43453-frgsd\nhsth()))\nbmepm35wae\nvmopaem2234+0+\ngsdm12313")
file.close()
Like you see, theres absolutely nothing made in the code, thats because I have no idea how im supposed to continue it to make it do what I was asking. As you can see, at the end of the passwords there is a \n to make it easier for isalnum() (if that is what tells if its alphanumerical) but I think it has to be removed before the isalnum() reads it, I dont even know if its possible.