Gettting list from user

I am unable to take input from user while using indexing method
How to do that