This works without a glitch in the command line interpreter: segments = {} # dictionary type segment = [] # populate segment segments[segment[0]] = segment[len(segment)-1] BUT, when I run it from the DOS prompt: "python segments.py", I got error message: TypeError: unhashable type. Any explanation is appreciated. Thanks. - sh