源代码
txt = ",,,,,rrttgg.....banana....rrr" x = txt.strip(",.grt") print(x)
运行结果