python的replace用法 Substitute與replace的區(qū)別?
Substitute與replace的區(qū)別?replace 和substitute都可作動(dòng)詞,但用法不一樣,一般搭配是replace A with B 用B來(lái)代替Asubstitute A
Substitute與replace的區(qū)別?
replace 和substitute都可作動(dòng)詞,但用法不一樣,一般搭配是replace A with B 用B來(lái)代替Asubstitute A for B 用A來(lái)代替B (或者A substitute for B)二者應(yīng)該可以互換使用,似乎replace用得更廣一些。例句:1. In manufacturing, cheaper materials are constantly being substituted for the better and more expensive kind. 2. The government decided to replace coal with gas. 3. Nothing can substitute for the advice the doctor is able to give you.另外,substitute還可以是名詞,意為代替品。 A is a substitute A是一個(gè)代替品
replace的用法和短語(yǔ)?
用在表達(dá)“更換,代替”的句子。
舉例:
Please replace thelight bulb.
請(qǐng)更換那燈泡。
I hired Tom to replace Jimmy.
我聘用了湯姆去代替占美。