You start your day, happily working with dictionaries…Life is good. >>> mydict = {‘key-a’: ‘value-a’, ‘key-b’: ‘value-b’} >>> mydict['key-a'] ‘value-a’ All of a sudden, storm clouds appear. Your dictionary variable accidentally gets assigned a list, and life is no longer good! >>> mydict = {‘key-a’: ‘value-a’, ‘key-b’: ‘value-b’} >>> mydict['key-a'] ‘value-a’ >>> mydict = [] [...]
Posts Tagged ‘TypeError’
TypeError: list indices must be integers
Posted in Engineering, Technique, tagged Python, Tuple, TypeError, list, python error on March 8, 2010 | Leave a Comment »
Archives
-
Top Posts
Categories
Pages
Archives
Meta