x = int(raw_input("Please enter an integer: ")) if x < 0: x = 0 print 'Negative changed to zero' elif x == 0: print 'Zero' elif x == 1: print 'Single' else: print 'More' # Сокращенные условия a = x if z>1 else y if x < y < z: print x; print y; print z
Python Справочник v0.05 © 2007-2024 Igor Salnikov aka SunDoctor