you take index as input from user and ask for number between 1 and column. Because indexes are zero-based, you need a number between 0 and column-1. It's up to you how you will achieve that - ask the user or post-process the user input before using it in your code that raise IndexError.
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs