📜  python input().strip() - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:23.692000             🧑  作者: Mango

代码示例1
txt = "     banana     "
x = txt.strip()
print("of all fruits", x, "is my favorite")

txt = ",,,,,rrttgg.....banana....rrr"
x = txt.strip(",.grt")
print(x)