[Tutor] Re: hello. I need some help pls (fwd) (original) (raw)
Matt Smith smith-matt at tiscali.co.uk
Fri Jul 16 19:23:59 CEST 2004
- Previous message: [Tutor] hello. I need some help pls (fwd)
- Next message: [Tutor] hello. I need some help pls (fwd)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Fri, 16 Jul 2004 10:03:56 -0700, Danny Yoo wrote:
print 'here are the ten numbers from 0 to 9' here are the ten numbers from 0 to 9 for 1 in range(10): print 1, SyntaxError: can't assign to literal
You need to use a valid variable name (eg. a letter or a string that starts with a letter). Try this:
for number in range(10): print number
that should produce the desired result.
Matt.
- Previous message: [Tutor] hello. I need some help pls (fwd)
- Next message: [Tutor] hello. I need some help pls (fwd)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]