indices question

Lanny lanny at
Sat Sep 6 20:44:04 CEST 2008

pretty self-explanatory, here's what I put in:

    while stat == 0 :
        pgrid#ignore, A pre-defined function
        print "what cell do you want?"
        varcc = raw_input
        grid[varc] = 'O'

And here's what I get back:

    Traceback (most recent call last):
      File "C:\py_prog\Tic Tac", line 27, in <module>
        grid[varc] = 'O'
    TypeError: list indices must be integers

Please don't tell me that "list indices must be integers" because I know 
that, Why can't I put a varible thats an integer instead? 

-- Posted on news:// - Complaints to news at --

More information about the Python-list mailing list