add task 106
This commit is contained in:
parent
9115788a7d
commit
601a4c9167
@ -3,13 +3,12 @@
|
|||||||
|
|
||||||
"""Rozwiązanie zadania 106."""
|
"""Rozwiązanie zadania 106."""
|
||||||
|
|
||||||
def freq_dic(seq):
|
def penultimate(list,otherwise):
|
||||||
"""Placeholder"""
|
if len(list)<=1:
|
||||||
dictionary = {}
|
obj = otherwise
|
||||||
|
else:
|
||||||
|
n = len(list)
|
||||||
|
n = n-2
|
||||||
|
obj = list[n]
|
||||||
|
return obj
|
||||||
|
|
||||||
for xxx in seq:
|
|
||||||
if dictionary.has_key(xxx):
|
|
||||||
dictionary[xxx] += 1
|
|
||||||
else:
|
|
||||||
dictionary[xxx] = 1
|
|
||||||
return dictionary
|
|
||||||
|
Loading…
Reference in New Issue
Block a user