Python文字列lstrip
strip

lstrip文字列

rstrip

先頭の空白(または指定した文字)を除去します。

構文

str.lstrip(chars?)

使用例

下記の値を入力するとサンプルに即時反映されます。

print
lstrip
text = "  hello world  "
print(text.lstrip())  # "hello world  "