David Eppstein <eppstein at ics.uci.edu> wrote: > >One problem with it as it stands is that it won't work when lst is a >simple generator. > >how about: > >try: > lst = iter(lst) >except TypeError: > lst = [lst] Unfortunately, iter(lst) will still convert a string into a list of chars. -- Dale Strickland-Clark Riverhall Systems Ltd