Replace Last Element Of String Python Functions