You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
Dismiss alert
<spanclass="gp">>>> </span><spanclass="s1">'"Yes," they said.'</span>
<spanclass="go">'"Yes," they said.'</span>
<spanclass="gp">>>> </span><spanclass="s2">"</span><spanclass="se">\"</span><spanclass="s2">Yes,</span><spanclass="se">\"</span><spanclass="s2"> they said."</span>
<spanclass="go">'"Yes," they said.'</span>
<spanclass="gp">>>> </span><spanclass="s1">'"Isn</span><spanclass="se">\'</span><spanclass="s1">t," they said.'</span>
<divclass="highlight-python3 notranslate"><divclass="highlight"><pre><span></span><spanclass="gp">>>> </span><spanclass="n">text</span><spanclass="o">=</span><spanclass="p">(</span><spanclass="s1">'Put several strings within parentheses '</span>
<spanclass="gp">... </span><spanclass="s1">'to have them joined together.'</span><spanclass="p">)</span>
<p>所有切片操作都會回傳一個新的 list ,包含要求的元素。這意謂著以下這個切片回傳了原本 list 的<aclass="reference internal" href="../library/copy.html#shallow-vs-deep-copy"><spanclass="std std-ref">淺複製</span></a>:</p>
<spanclass="gp">>>> </span><spanclass="nb">print</span><spanclass="p">(</span><spanclass="s1">'The value of i is'</span><spanclass="p">,</span><spanclass="n">i</span><spanclass="p">)</span>