can't assign to literal

Lie Lie.1296 at gmail.com
Wed Jun 11 16:32:09 CEST 2008


On Jun 11, 2:53 am, maehhheeyy <maehhhe... at gmail.com> wrote:
> this is stopping my program from running properly. is there something
> wrong in my code when that happens?

That simply means you did something like this:
'hello' = 'another'
123 = 'kilo'
[12, 'asd] = 123

Sometimes it's not that obvious (although they're obvious for a more
experienced programmers):
for 123 in xrange(10):
    pass

I think you've realized what you've done. And there is a pretty
obvious signal that hints that you didn't know the basic syntax of
python (or at least the basic syntax of the for-loop).



More information about the Python-list mailing list