Hello All,
   I have just started out with python and was feeling pretty comfortable and 
confident to the point of solving problems from websites. But now, there is a 
program from Google's Python Exercises whose main() part is already given to 
you.


def main():
  # This command-line parsing code is provided.
  # Make a list of command line arguments, omitting the [0] element
  # which is the script itself.
  args = sys.argv[1:]

  if not args:
    print 'usage: [--summaryfile] file [file ...]'
    sys.exit(1)

  # Notice the summary flag and remove it from args if it is present.
  summary = False
  if args[0] == '--summaryfile':
    summary = True
    del args[0]

The problem is one where you have to define a function to read a html file 
containing the 1000 most popular baby names of a particular year(separate files 
for different years) and print each name in alphabetical order with their 
corresponding rank for that year.

My problem is that I cannot understand anything in this main() module. Nothing 
at all. So can somebody please explain what this means and what is its 
significance?

Thank You

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to