- 1
code for leap year in a line?
give a code for leap year in a single line. surely u will use main function but not any other function. you may take arg from outside
2 Respostas
0
in python 3
def isleapyear(year):
return (year % 4 == 0 and year % 100 != 0) or year % 400 == 0
0
we can use ternary operaror