write a function solution in python

join shbcf.ru