15 lines
208 B
Python
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
|
|
|