How can i read text, e.g., username and password from a file line-by-line in Python? For example, i can achieve this in shell/bash:
#!/bin/bash
AUTH='/authentication/account.txt'
U=$(sed -n 1p ${AUTH})
P=$(sed -n 2p ${AUTH})
and inside the file /authentication/account.txt are my username and password line-by-line like this:
username
userpass