5 lines
114 B
Python
5 lines
114 B
Python
def penultimate(list, otherwise):
|
|
if len(list) < 2:
|
|
return otherwise
|
|
else:
|
|
return list[-2] |