str.strip([chars]);
chars -- 從字串開始處或結束要刪除的字元
#!/usr/bin/python3 str = "*****this is string example....wow!!!*****" print (str.strip( '*' ))
this is string example....wow!!!