[Tutor] Learning to program, not code.

2014-12-19 Thread Brandon Dorsey
Hello All, Programming has always been a passion of mine, however, I'm frequently frustrated at simple fact that I've been learning python for 8 months, and I have yet to start, and finish, a simple project. I find difficult to not only visualize the execution, but to figure out when and where

Re: [Tutor] Learning to program, not code.

2014-12-21 Thread Brandon Dorsey
a tendency to over analyze everything, and with > programming - as we all know - there are a million ways to accomplish the > same task. > On Fri, Dec 19, 2014 at 8:06 AM, Dave Angel wrote: > On 12/18/2014 09:09 PM, Brandon Dorsey wrote: > >> Hello All, >> >> Pro

[Tutor] multiple objects with one assignment?

2015-01-02 Thread Brandon Dorsey
I know there is are easier ways to assign multiple objects to a variable, but why, does the following code work? Why does it return a tuple versus a list? I know it has something to do with the semi-colon, but I didn't know it wouldn't raise an error. greetings = "hello,", "what's", "your", "na

Re: [Tutor] multiple objects with one assignment?

2015-01-02 Thread Brandon Dorsey
On Fri, Jan 2, 2015 at 6:34 AM, Steven D'Aprano wrote: > The thing to remember is that *commas*, not parentheses, are used for > making tuples. The round brackets are just for grouping. > That's what I was confused about. I didn't realize commas defined tuples, not parentheses. Is this the cas

Re: [Tutor] multiple objects with one assignment?

2015-01-02 Thread Brandon Dorsey
On Fri, Jan 2, 2015 at 6:27 AM, Dave Angel wrote: Ben's description is very good. But I think the main thing you're missing > is that a tuple is created by the comma, not by parentheses. In some > contexts, parentheses need to be added to make it non-ambiguous, since > comma is overloaded. Th

Re: [Tutor] multiple objects with one assignment?

2015-01-02 Thread Brandon Dorsey
On Fri, Jan 2, 2015 at 6:08 AM, Ben Finney wrote: > Does it help you to understand if I clarify that a tuple is one value? > That a list is one value? That a dict is one value? > Well I knew that those data structures represent one value that can hold "x" amount of objects, but what I didn't rea