zjfz-2019-s402281/intro/Task106.py
2020-01-12 15:16:54 +01:00

15 lines
208 B
Python

#!/usr/bin/python2
# -*- coding: utf-8 -*-
"""Rozwiązanie zadania 106."""
def penultimate(list,otherwise):
if len(list)<=1:
obj = otherwise
else:
n = len(list)
n = n-2
obj = list[n]
return obj