結果 : python remove trailing character if exists