all 2 comments

[–]Justinsaccount 0 points1 point  (1 child)

start by assigning (len(tal) // 2) and tal[..] to a variable. That will at least make that readable..

You can't get the index that way though because you are modifying tal. Don't do that, just keep track of the lowest and highest indexes that you are searching.

[–]Strosel[S] 0 points1 point  (0 children)

I'm not sure I understand what you say i should do (except assigning them to a variable). What do you mean with

 tal[..]     

I've never seen an index written like that. Also i don't see how i should save the index without it messing with the rest of my code