<label id="bh7tp"><big id="bh7tp"></big></label>

<em id="bh7tp"><tr id="bh7tp"><u id="bh7tp"></u></tr></em>
<th id="bh7tp"></th>

<li id="bh7tp"><acronym id="bh7tp"></acronym></li>
  • <em id="bh7tp"></em>

    <tbody id="bh7tp"><pre id="bh7tp"></pre></tbody>
  • Python教程自學網歡迎您來學習!
    當前位置: 首頁 > Python爬蟲 > python sep啥意思

    python sep啥意思

       

    python sep啥意思

    全稱為Separate意為分開、隔開。

    用于print兩個元素時自定義間隔符(默認為兩個空格)

    關鍵字參數sep是實現分隔符,比如多個參數輸出時想要輸出中間的分隔字符。

    print(1,?2,?3,?sep?=?',',?end?=?'\r\n')
    print(1,?2,?3,?sep?=?'?',?end?=?'\r\n')

    結果輸出如下:

    1,2,3
    1?2?3
    print("file\n","abc","bcd","fff\n","poi")
    print("-------------")
    print("file\n","abc","bcd","fff\n","poi",sep='')
    print("-------------")
    print("file\n","abc","bcd","fff\n","poi",sep='?')
    print("-------------")

    其結果為:

    file
    ?abc?bcd?fff
    poi-------------file
    abcbcdfff
    poi-------------file
    ?abc?bcd?fff
    poi-------------
    人人爽人人澡人人人妻
    <label id="bh7tp"><big id="bh7tp"></big></label>

    <em id="bh7tp"><tr id="bh7tp"><u id="bh7tp"></u></tr></em>
    <th id="bh7tp"></th>

    <li id="bh7tp"><acronym id="bh7tp"></acronym></li>
  • <em id="bh7tp"></em>

    <tbody id="bh7tp"><pre id="bh7tp"></pre></tbody>