zjfz-2019-s402281/intro/Task105.py
2020-01-12 13:16:55 +01:00

15 lines
308 B
Python

#!/usr/bin/python2
# -*- coding: utf-8 -*-
"""Rozwiązanie zadania 105."""
def change_first(tuple_t, element_e):
"""Docstring for Pylint points"""
if not tuple_t:
return ()
tuple_list = list(tuple_t)
tuple_list[0] = element_e
new_tuple = tuple(tuple_list)
return new_tuple