[python-nl] if optie
Wichert Akkerman
wichert at wiggy.net
Fri Aug 10 14:11:57 CEST 2007
frankje wrote:
> Hallo,
>
> Ik ben net begonnen met een cursus python op www.developer.com. Hier staat
> echter een listing in waarop ik een foutcode krijg (zie hieronder):
>
> t1 = "a",
> t2 = t1*2
> if ("b" in t2)
> print "OK"
> if ("a" in t2):
> print "t2"
> print t2
> print "length = ",len(t2)
>
>
> De foutcode die ik krijg is:
>
> frank at ubuntu:~/python$ python tuple05.py
> File "tuple05.py", line 10
> if ("b" in t2)
> ^
> SyntaxError: invalid syntax
> frank at ubuntu:~/python$
>
> Weet iemand wat er hier fout is?
er mist een : aan het eind van die regel.
Wichert.
--
Wichert Akkerman <wichert at wiggy.net> It is simple to make things.
http://www.wiggy.net/ It is hard to make things simple.
More information about the Python-nl
mailing list