Newbie that don't understand

Martin Ståhl martin.stahl at
Sat Jun 29 19:00:16 CEST 2002

I have never been programming before and now I am reading the
"Non-Programmers Tutorial For Python"
And don't understand the following
I quote

"To start off this chapter I am going to give you a example of what you
could do but shouldn't (so don't type it in):

a = 23
b = -23

if a < 0:
    a = -a

if b < 0:
    b = -b

if a == b:
    print "The absolute values of", a,"and",b,"are equal"
    print "The absolute values of a and b are different"

with the output being:
The absolute values of 23 and 23 are equal"

how can 23 and -23 be equal?

More information about the Python-list mailing list