0

So i have some code pulling a unique id from a webpage, i then use that id in a loop and when its used i want it to get a new unique id, i know i can put the code pulling ids into the loop, but i use the code to tell the loop how long it should run. So is there anyway i can reload the id without putting all the code in the loop?

followrequestsnumber = jsonfollowrequests.count("\",\"username\"")
approveid = jsonfollowrequests[startapproveid:stopapproveid]
while followrequestnumber >=1:
    uses the id on this line.
    loop ends and now i want to switch the approveid to a new one

1 Answer 1

1

Why not something like this?

followrequestsnumber = jsonfollowrequests.count("\",\"username\"")
while followrequestnumber >=1:
    approveid = jsonfollowrequests[startapproveid:stopapproveid]
    followrequestsnumber = jsonfollowrequests.count("\",\"username\"")

    ...
Sign up to request clarification or add additional context in comments.

1 Comment

I might have done something wrong but when i did that it was the same as before

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.