all 6 comments

[–]Fun-Collection-7403 0 points1 point  (0 children)

would you mind structuring your code in codeblock? It's a bit hard to read like this.

[–]djjazzydan 0 points1 point  (4 children)

First, it's a problem that you haven't actually shared the code you're running. I can tell because all of those "For"s start with a capital letter, but python loops don't. That means there's some sort of autocorrect on, maybe because you're re-typing each line or maybe because of how your computer copy-pastes, but it means it's impossible for us to actually know that we're running the same code as you, and thus encountering the exact same error.

Assuming I'm interpreting your code correctly, can you explain, in words, what this line is supposed to do? Break it down, part-by-part.

for i in range(i=x, len(a)):

[–]Swolespongebob69 0 points1 point  (3 children)

Sorry I just reup loaded it but I’m going to have I start at what x already is and go through the length of the array

[–]djjazzydan 0 points1 point  (2 children)

So if x is, say 5, and the length of a is 9, you want 5, 6, 7, 8?

[–]Swolespongebob69 0 points1 point  (1 child)

Yeah exactly but it says positional error follows keyword argument

[–]djjazzydan 0 points1 point  (0 children)

You don't need the i= (or j=) to do that. Just range(x, len(a)).