📌

空文字の削除

に公開


char = 'abcdef   '
new_char = char.rstrip() # 空文字の削除
print(new_char) # abcdef


Discussion