zjfz-2019-s393639/intro/Task106.py

5 lines
114 B
Python
Raw Normal View History

2020-01-12 15:40:05 +01:00
def penultimate(list, otherwise):
if len(list) < 2:
return otherwise
else:
return list[-2]