Replace Last Element Of String Python Functions Interview