[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [GNUe] Problem with comparing negative numbers?
From: |
Reinhard Mueller |
Subject: |
Re: [GNUe] Problem with comparing negative numbers? |
Date: |
Fri, 25 Nov 2005 15:30:23 +0100 |
Am Freitag, den 25.11.2005, 13:17 +0100 schrieb Zvonimir Jericevic:
> Problem is in results: I get that -1 < -5 and -6 > -5, and -10 < -5 and 0 >
> -5.
Hehe, cool learning experience :-)
The "unos" value you get ist most probably a string, so python compares
lexically.
What you want to check is
if int (unos) < -5:...
Reinhard
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil