> Lanny:
>> ...
>> varcc = raw_input
>> grid[varc] = 'O'
>> ...
>> Why can't I put a varible thats an integer instead?
>
> 'varcc' and 'varc' are different names.
>
> 'raw_input' isn't a function call, you may want to turn that into a
> function call.
>
> varc isn't an integer, you
Lanny:
> ...
> varcc = raw_input
> grid[varc] = 'O'
> ...
> Why can't I put a varible thats an integer instead?
'varcc' and 'varc' are different names.
'raw_input' isn't a function call, you may want to turn that into a
function call.
varc isn't an integer, you may have to conver
Lanny wrote:
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?
raw_input() always returns a string. You have to convert the string into
an integer using int().
Christian
--
http://mail.python.org/mailman/list
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\Ti