¡@

Home 

python Programming Glossary: processingdata

Python: Memory usage and optimization when modifying lists

http://stackoverflow.com/questions/2631053/python-memory-usage-and-optimization-when-modifying-lists

one is the best candidate Keeping a local index while processingdata index 0 while index len somelist item somelist index dosomestuff.. and memory efficient. Walking the list backwards while processingdata for i in xrange len somelist 1 1 1 dosomestuff item if somecondition.. they appear in the original list. Making a new list while processingdata for i item in enumerate somelist dosomestuff item newlist for..