Python - How to find cells around index in Array?
Go to solution
Solved by Guest,
1 minute ago, Yellow_ said:I have given that a try, though array indexing is a little weirder than list indexing it seems. The edges really goof me up
You can't access things outside the bounds of the array.
You can use error handling like "try catch" if python has that.
Or you can use if statements.
IE
if (!(index - 1 < 0)) Do code if (!(index + 1 > highestIndex)) Do code
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now