I am working with Selenium to input URLs from a list into a form. The form can only accept 10 URLs at a time and my list may contain over 300 URLs. I want to take x items from the list, input into form, and once completed do that again until all elements of the list have been used. Should I be placing the items into another list, popping them off the old list, input this new list, and then repeat? Suggestions appreciated!
Asked
Active
Viewed 38 times
0
-
If you have a specific coding related problem, ask a question after reading through: [tour], [mcve] and [ask] + [help/on-topic]. Not doing so will lead to downvotes & closevotes. It is unclear what your problem is - you show no code at all - SO is not really usable for philosophical discussions about how to do something. Do it - if you get _specific_ errors debug them, research them,then maybe post a question sharing your problem and code. – Patrick Artner Dec 27 '18 at 20:43
-
1In future, please post using the generic Python tag rather than the version specific ones, unless you are discussing a feature specific to the version. – Mad Physicist Dec 27 '18 at 20:44
-
I will indeed use generic python tag from now on. And thanks for the links. I did not find those when searching, but I did not search with the word "chunks" – JohnD Dec 28 '18 at 19:52
-
If anyone finds this, I found nosklo's answer in [link](https://stackoverflow.com/questions/434287/what-is-the-most-pythonic-way-to-iterate-over-a-list-in-chunks) to be exactly what I was looking for – JohnD Dec 31 '18 at 18:51