-1
Good afternoon, you guys! I’m having trouble recording each line into a variable to be used in a for. In my file . txt has a list of several contacts, e.g.: [email protected], [email protected].
What I need to do is use this file . txt to send contact messages by contact. Here’s an example of how I tried to make the code:
contatos = open("contatos.txt", "r")
linhas = contatos.readlines()
for linha in linhas:
msg = "Boa tarde"
mac.send_message_to(msg, linha)
contatos.close()
This mac.send_message_to() method is being imported from another file... Who can help me I thank!
And what’s the problem?
– Woss