2007-04-07, 20:36
hello i am trying to learn python i was doing ok
can somone please tell me why this don't work from
5.6 Looping Techniques
thanks
knights = {'gallahad': 'the pure', 'robin': 'the brave'}
for k, v in knights.iteritems():
print k, v
i get this error
19:18:02 M: 36392960 INFO: Q:\scripts\test.py
19:18:02 M: 36392960 INFO: ", line
19:18:02 M: 36392960 INFO: 13
19:18:02 M: 36392960 INFO:
19:18:02 M: 36392960 INFO:
19:18:02 M: 36392960 INFO: for k, v in knights.iteritems():
19:18:02 M: 36392960 INFO:
19:18:02 M: 36392960 INFO: ^
19:18:02 M: 36392960 INFO: SyntaxError
19:18:02 M: 36392960 INFO: :
19:18:02 M: 36392960 INFO: invalid syntax
can somone please tell me why this don't work from
5.6 Looping Techniques
thanks
knights = {'gallahad': 'the pure', 'robin': 'the brave'}
for k, v in knights.iteritems():
print k, v
i get this error
19:18:02 M: 36392960 INFO: Q:\scripts\test.py
19:18:02 M: 36392960 INFO: ", line
19:18:02 M: 36392960 INFO: 13
19:18:02 M: 36392960 INFO:
19:18:02 M: 36392960 INFO:
19:18:02 M: 36392960 INFO: for k, v in knights.iteritems():
19:18:02 M: 36392960 INFO:
19:18:02 M: 36392960 INFO: ^
19:18:02 M: 36392960 INFO: SyntaxError
19:18:02 M: 36392960 INFO: :
19:18:02 M: 36392960 INFO: invalid syntax