¡@

Home 

python Programming Glossary: list_of_g

Remove items from a list while iterating without using extra memory in Python

http://stackoverflow.com/questions/2629198/remove-items-from-a-list-while-iterating-without-using-extra-memory-in-python

or more elegant way than this to do it def walk_list list_of_g g_index 0 while g_index len list_of_g g_current list_of_g g_index.. do it def walk_list list_of_g g_index 0 while g_index len list_of_g g_current list_of_g g_index if subtle_condition g_current list_of_g.pop.. list_of_g g_index 0 while g_index len list_of_g g_current list_of_g g_index if subtle_condition g_current list_of_g.pop g_index..