•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Python section within the Software Development category of DaniWeb, a massive community of 422,412 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 5,041 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Python advertiser: Programming Forums
Views: 282 | Replies: 5
![]() |
•
•
Join Date: May 2008
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
While executing programs with large lists ,i am encountering an error message:
Index error:List index out of range
The program works well with small lists..Can anyone suggest me some efficient methods to handle this problem?or Is there any other efficient datastructure other than lists and dictionary to serve the purpose ?
Index error:List index out of range
The program works well with small lists..Can anyone suggest me some efficient methods to handle this problem?or Is there any other efficient datastructure other than lists and dictionary to serve the purpose ?
I don't think it has much to do with the size of the list, you are simply going past the number of indexed elements. Look at this example:
python Syntax (Toggle Plain Text)
my_list = [1, 2, 3, 4] print my_list[4] # IndexError: list index out of range
drink her pretty
•
•
Join Date: Dec 2006
Posts: 443
Reputation:
Rep Power: 2
Solved Threads: 62
"list index out of range" has nothing to do with the size of the list AFAIK. If the list were too large there would be some sort of out of memory message. SQLite can be used in memory but you'll have to provide some more info on how many records you want to store, what is the size of each record, and what you want to do in order to be more specific.
•
•
•
•
Is there any other efficient datastructure other than lists and dictionary to serve the purpose ?
![]() |
•
•
•
•
•
•
•
•
DaniWeb Python Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- Firefox Compatibility help with script (JavaScript / DHTML / AJAX)
- Cannot find server or DNS Error - please help! (Viruses, Spyware and other Nasties)
- memory management in wndows 2000 (Windows NT / 2000 / XP / 2003)
- Open In New Window Php (PHP)
- Beginning Perl (Perl)
- Winsock Multi-Client Servers (C++)
Other Threads in the Python Forum
- Previous Thread: Inserting rows in Excel
- Next Thread: Writing arrays to a column of a spreadsheet?



Linear Mode