On Fri, Aug 3, 2012 at 2:09 PM, Alexander Q. wrote:
>
>
> On Fri, Aug 3, 2012 at 1:40 PM, Jerry Hill wrote:
>
>> On Fri, Aug 3, 2012 at 4:18 PM, Alexander Q.
>> wrote:
>> > I'm following the tutorial from python.org
>> > (http://docs.python.org/tutorial/introduction.html) and am having a few
>>
On 03/08/12 22:09, Alexander Q. wrote:
That was it Jerry- when I typed in "print hello" instead of just
"hello", the output was exactly like the one in the tutorial.
Yes, the interactive interpreter shows the representation
(repr()) of the data while print shows the normal output. There are
s
On Fri, Aug 3, 2012 at 1:40 PM, Jerry Hill wrote:
> On Fri, Aug 3, 2012 at 4:18 PM, Alexander Q. wrote:
> > I'm following the tutorial from python.org
> > (http://docs.python.org/tutorial/introduction.html) and am having a few
> > indiscrepancies regarding the new line command.
> >
> > The tutor
On Fri, Aug 3, 2012 at 4:18 PM, Alexander Q. wrote:
> I'm following the tutorial from python.org
> (http://docs.python.org/tutorial/introduction.html) and am having a few
> indiscrepancies regarding the new line command.
>
> The tutorial says that this code
>
> hello = "This is a rather long strin
I'm following the tutorial from python.org (
http://docs.python.org/tutorial/introduction.html) and am having a
few indiscrepancies regarding the new line command.
The tutorial says that this code
hello = "This is a rather long string containing\n\
several lines of text just as you would do in C.
On 12/4/10, Steven D'Aprano wrote:
> Alex Hall wrote:
>> On 12/4/10, Alan Gauld wrote:
>>> "Steven D'Aprano" wrote
>>>
>>> for i in (1, 2, 3):
... print(i, "spam", end="\n" if i==3 else "***")
>>> Ooooh! A new trick.
>>> I hadn't thought of using the conditional expression there but
> >> ... print(i, "spam", end="\n" if i==3 else "***")
> >
> > I hadn't thought of using the conditional expression there but it
> > makes a lot of sense.
> So is this a python3.x feature only? Is there an equivallent in 2.x? I
The end parameter of print is a Python 3 feature - only poss
Alex Hall wrote:
On 12/4/10, Alan Gauld wrote:
"Steven D'Aprano" wrote
for i in (1, 2, 3):
... print(i, "spam", end="\n" if i==3 else "***")
Ooooh! A new trick.
I hadn't thought of using the conditional expression there but it
makes a lot of sense.
Definitely more fun and flexible than
On 12/4/10, Alan Gauld wrote:
>
> "Steven D'Aprano" wrote
>
>> >>> for i in (1, 2, 3):
>> ... print(i, "spam", end="\n" if i==3 else "***")
>
> Ooooh! A new trick.
> I hadn't thought of using the conditional expression there but it
> makes a lot of sense.
> Definitely more fun and flexible th
"Steven D'Aprano" wrote
>>> for i in (1, 2, 3):
... print(i, "spam", end="\n" if i==3 else "***")
Ooooh! A new trick.
I hadn't thought of using the conditional expression there but it
makes a lot of sense.
Definitely more fun and flexible than the old comma at the end of a
print in v2
On Sat, Dec 4, 2010 at 3:04 AM, Rance Hall wrote:
> Ava:
>
> On an old typewriter when you slapped that mechanical arm two separate
> but related things happened.
>
> 1) the page advanced to the next line of text.
> 2) the carriage was returnedt to the beginning of the line of text.
>
> If you wer
Ashley Blackwell wrote:
Hello everybody, I'm new to the mailing list so I'm pretty sure I'll have
lots of questions:)
It's a very basic question I have and everybody might look at this
question and say, "Wow, she reallly doesn't get it?" But oh well. Here's my
question: I'm in Chapter 2 of my Py
On 12/3/10, Ashley Blackwell wrote:
> Hello everybody, I'm new to the mailing list so I'm pretty sure I'll have
> lots of questions:)
That is what the list is for. :)
>
> It's a very basic question I have and everybody might look at this
> question and say, "Wow, she reallly doesn't get it?" But o
Ava:
On an old typewriter when you slapped that mechanical arm two separate
but related things happened.
1) the page advanced to the next line of text.
2) the carriage was returnedt to the beginning of the line of text.
If you were careful about the way you slapped that mechanical arm, you
could
Hello Ava/Ashley
On 4 December 2010 01:47, Ashley Blackwell wrote:
> Exactly what is a newline character?
Not all characters used to encode information are printable/displayable
characters like the letters in the alphabet or numerals or punctuation and
symbols. There's several "special" chara
Hello everybody, I'm new to the mailing list so I'm pretty sure I'll have
lots of questions:)
It's a very basic question I have and everybody might look at this
question and say, "Wow, she reallly doesn't get it?" But oh well. Here's my
question: I'm in Chapter 2 of my Python Programming Third Edi
On 8/21/2010 2:36 PM, Roelof Wobben wrote:
Hello,
I have this programm :
def print_digits(n):
"""
>>> print_digits(13789)
9 8 7 3 1
>>> print_digits(39874613)
3 1 6 4 7 8 9 3
>>> print_digits(213141)
1 4 1 3 1 2 """
count = 0
while n:
count = count + 1
Hello,
I have this programm :
def print_digits(n):
"""
>>> print_digits(13789)
9 8 7 3 1
>>> print_digits(39874613)
3 1 6 4 7 8 9 3
>>> print_digits(213141)
1 4 1 3 1 2 """
count = 0
while n:
count = count + 1
n = n / 10
18 matches
Mail list logo