python去除字符串中指定的特殊符號

def compare_srt(str1,str2)
    str_start = re.sub('[*]', '', str1) #去除*號返回結果
    str_end = re.sub('[*]', '', str2)
return str_start,str_end
<script>
    // 遍歷select
    $("#envirType").each(function() {
        // this代表的是<option></option>,對option再進行遍歷
        $(this).children("option").each(function() {
            // 判斷需要對那個選項進行回顯
            if (this.value === "{{ envir_str }}") {
                console.log($(this).text());
                // 進行回顯
                $(this).attr("selected","selected");
            }
        });
    })
</script>
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章