what does int means for python ?

alefajnie devphyl at gmail.com
Sun May 11 05:17:52 EDT 2008


#!/usr/bin/env python

arr = [[0 for c in range(0, 10)] for r in range(0, 10)]             #
10x10 array

arr[2,3]                 # throws TypeError: list indices must be
integers
arr[int(2), int(3)]     # also throws TypeError: list indices must be
integers !

-------------------------------------------------
what is wrong in above script ?





More information about the Python-list mailing list