Newbie Problem
Aahz Maruch
aahz at netcom.com
Wed Jul 28 19:28:56 EDT 1999
More information about the Python-list mailing list
Wed Jul 28 19:28:56 EDT 1999
- Previous message (by thread): a little motivation, anyone?
- Next message (by thread): Newbie Problem
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
In article <7nndss$q1n$1 at alexander.INS.CWRU.Edu>, <rbl at hal.cwru.edu> wrote: > >Python 1.5.1 (#37, Apr 27 1998, 13:36:04) [CW PPC w/GUSI w/MSL] >Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam >>>> import sys >>>> import random >>>> import string >>>> >>>> def run(filename=''): >... if filename=='': > File "<stdin>", line 2 > if filename=='': > ^ >SyntaxError: invalid syntax Python uses indentation for control structures; "def" is a control structure. Therefore, the "if" needs to be indented. -- --- Aahz (@netcom.com) Androgynous poly kinky vanilla queer het <*> http://www.rahul.net/aahz/ Hugs and backrubs -- I break Rule 6 (if you want to know, do some research)
- Previous message (by thread): a little motivation, anyone?
- Next message (by thread): Newbie Problem
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list