Re: Beginner question: Converting Single-Element tuples to list

2005-06-27 Thread vdavidster
Hi Paul and everyone else, I ran the script and here's what I got: Python version: 2.4.1 (#2, Mar 31 2005, 00:05:10) [GCC 3.3 20030304 (Apple Computer, Inc. build 1666)] pyparsing version: 1.3 'abc def' -> ['abc', 'def'] 'abc' -> ['abc'] It seems to work fine. I figured out what my problem was:

Re: Beginner question: Converting Single-Element tuples to list

2005-06-26 Thread vdavidster
Hi, Thanks for your reply! A new thing learned Allow me to follow that up with another question: Let's say I have a result from a module called pyparsing: Results1 = ['abc', 'def'] Results2 = ['abc'] They are of the ParseResults type: >>> type(Results1) >>> type(Results2) I want to con

Beginner question: Converting Single-Element tuples to list

2005-06-26 Thread vdavidster
Hello everyone, I want to convert a tuple to a list, and I expected this behavior: list(('abc','def')) -> ['abc','def'] list(('abc')) -> ['abc'] But Python gave me this behavior: list(('abc','def')) -> ['abc','def'] list(('abc')) -> ['a','b','c'] How do I do get Python to work like the in form