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