On Wed, May 30, 2012 at 07:00:30AM +0100, Spyros Charonis wrote:
> FINAL SOLUTION:
Not quite. You are making the mistake of many newbies to treat Python
exceptions as a problem to be covered up and hidden, instead of as a
useful source of information.
To quote Chris Smith:
"I find it amusi
On Wed, May 30, 2012 at 8:16 AM, Steven D'Aprano wrote:
> On Wed, May 30, 2012 at 07:00:30AM +0100, Spyros Charonis wrote:
> > FINAL SOLUTION:
>
> Not quite. You are making the mistake of many newbies to treat Python
> exceptions as a problem to be covered up and hidden, instead of as a
> useful s
Hello all,
I am working on learning Python(on my own) and ran into an exercise that I
figured out but I wanted to know if there was a different way to write the
code? I know he wanted a different answer for the body because we haven't
gotten to the ' '.join() command yet.
This is what I have:
de
Seems like a lot of extra work for joining the strings. You should only
need:
''.join(['very', 'hot', 'day']) (no spaces)
' '.join(['very', 'hot', 'day']) (if you want spaces)
glen
On Wed, May 30, 2012 at 11:21 AM, Akeria Timothy wrote:
> Hello all,
>
> I am working on learning Python(on my ow
On 05/30/2012 12:21 PM, Akeria Timothy wrote:
> Hello all,
>
> I am working on learning Python(on my own) and ran into an exercise that I
> figured out but I wanted to know if there was a different way to write the
> code? I know he wanted a different answer for the body because we haven't
> gotten
On 5/30/2012 12:21 PM, Akeria Timothy wrote:
In addition to the other comments I point out that join is not a
/command/, it is a /string method/. Python does not have commands.
--
Bob Gailer
919-636-4239
Chapel Hill NC
___
Tutor maillist - Tutor@p
On Wed, 2012-05-30 at 12:21 -0400, Akeria Timothy wrote:
[...]
> def joinStrings(stringList):
> string = []
indentation error in that the above line and the below line should have
the same indent level. Also the above line and the following line are
both definitions of the variable string so the
A procedural point here: You forgot to include the list, and just
replied to me privately. Normally, what you should do is a Reply-All.
Or else make sure tutor@python.org is one of the To: or CC: list
On 05/30/2012 01:40 PM, Akeria Timothy wrote:
> I did copy and paste and I'm learning Pyth
Spyros Charonis wrote:
On Wed, May 30, 2012 at 8:16 AM, Steven D'Aprano wrote:
[...]
There is little as painful as a program which prints "An error occurred"
and then *keeps working*. What does this mean? Can I trust that the
program's final result is correct? How can it be correct if an error