A
A
azukizxc2021-09-11 23:30:36
Python
azukizxc, 2021-09-11 23:30:36

How to take a line from a txt file one by one?

I decided to write a VK spammer, but on it you need to take the id of friends somewhere, I wrote a simple id parser through vk_api, which throws all the id into a text file, each on a new line.
But I still don’t understand how to get id from this text document in turn.
Everything should work like this And so on in a loop with each id
driver.get("https://vk.com/write" + id)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Milla Cornejo, 2021-09-12
@LimonchikIgraetSamCSoboy

a = open("filename.txt", "r")
s.readline()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question