Hi.<div><br></div><div>in this document,</div><div><a href="http://docs.python.org/py3k/tutorial/datastructures.html">http://docs.python.org/py3k/tutorial/datastructures.html</a></div><div><br></div><div><span class="Apple-style-span" style="font-family: sans-serif; font-size: 16px; "><pre style="overflow-x: auto; overflow-y: auto; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; background-color: rgb(238, 255, 204); color: rgb(51, 51, 51); line-height: 15px; border-top-width: 1px; border-right-width: initial; border-bottom-width: 1px; border-left-width: initial; border-top-style: solid; border-right-style: none; border-bottom-style: solid; border-left-style: none; border-top-color: rgb(170, 204, 153); border-right-color: initial; border-bottom-color: rgb(170, 204, 153); border-left-color: initial; ">
<span class="gp" style="color: rgb(198, 93, 9); font-weight: bold; ">>>> </span><span class="n">basket</span> <span class="o" style="color: rgb(102, 102, 102); ">=</span> <span class="p">{</span><span class="s" style="color: rgb(64, 112, 160); ">'apple'</span><span class="p">,</span> <span class="s" style="color: rgb(64, 112, 160); ">'orange'</span><span class="p">,</span> <span class="s" style="color: rgb(64, 112, 160); ">'apple'</span><span class="p">,</span> <span class="s" style="color: rgb(64, 112, 160); ">'pear'</span><span class="p">,</span> <span class="s" style="color: rgb(64, 112, 160); ">'orange'</span><span class="p">,</span> <span class="s" style="color: rgb(64, 112, 160); ">'banana'</span><span class="p">}</span>
<span class="gp" style="color: rgb(198, 93, 9); font-weight: bold; ">>>> </span><span class="nb" style="color: rgb(0, 112, 32); ">print</span><span class="p">(</span><span class="n">basket</span><span class="p">)</span>
<span class="go" style="color: rgb(48, 48, 48); ">{'orange', 'banana', 'pear', 'apple'}</span>
<span class="gp" style="color: rgb(198, 93, 9); font-weight: bold; ">>>> </span><span class="n">fruit</span> <span class="o" style="color: rgb(102, 102, 102); ">=</span> <span class="p">[</span><span class="s" style="color: rgb(64, 112, 160); ">'apple'</span><span class="p">,</span> <span class="s" style="color: rgb(64, 112, 160); ">'orange'</span><span class="p">,</span> <span class="s" style="color: rgb(64, 112, 160); ">'apple'</span><span class="p">,</span> <span class="s" style="color: rgb(64, 112, 160); ">'pear'</span><span class="p">,</span> <span class="s" style="color: rgb(64, 112, 160); ">'orange'</span><span class="p">,</span> <span class="s" style="color: rgb(64, 112, 160); ">'banana'</span><span class="p">]</span>
<span class="gp" style="color: rgb(198, 93, 9); font-weight: bold; ">>>> </span><span class="n">fruit</span> <span class="o" style="color: rgb(102, 102, 102); ">=</span> <span class="nb" style="color: rgb(0, 112, 32); ">set</span><span class="p">(</span><span class="n">basket</span><span class="p">)</span> <span class="c" style="color: rgb(64, 128, 144); font-style: italic; "># create a set without duplicates</span></pre>
<pre style="overflow-x: auto; overflow-y: auto; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; background-color: rgb(238, 255, 204); color: rgb(51, 51, 51); line-height: 15px; border-top-width: 1px; border-right-width: initial; border-bottom-width: 1px; border-left-width: initial; border-top-style: solid; border-right-style: none; border-bottom-style: solid; border-left-style: none; border-top-color: rgb(170, 204, 153); border-right-color: initial; border-bottom-color: rgb(170, 204, 153); border-left-color: initial; ">
<span class="c" style="color: rgb(64, 128, 144); ">the last sentence should be like below one. basket was originally set, so we don't need to change to set redundantly I think.</span></pre><pre style="overflow-x: auto; overflow-y: auto; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; background-color: rgb(238, 255, 204); color: rgb(51, 51, 51); line-height: 15px; border-top-width: 1px; border-right-width: initial; border-bottom-width: 1px; border-left-width: initial; border-top-style: solid; border-right-style: none; border-bottom-style: solid; border-left-style: none; border-top-color: rgb(170, 204, 153); border-right-color: initial; border-bottom-color: rgb(170, 204, 153); border-left-color: initial; ">
<font class="Apple-style-span" color="#408090"><i><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: sans-serif; font-style: normal; line-height: normal; white-space: normal; "><pre style="overflow-x: auto; overflow-y: auto; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; background-color: rgb(238, 255, 204); color: rgb(51, 51, 51); line-height: 15px; border-top-width: 1px; border-right-width: initial; border-bottom-width: 1px; border-left-width: initial; border-top-style: solid; border-right-style: none; border-bottom-style: solid; border-left-style: none; border-top-color: rgb(170, 204, 153); border-right-color: initial; border-bottom-color: rgb(170, 204, 153); border-left-color: initial; ">
<span class="gp" style="color: rgb(198, 93, 9); font-weight: bold; ">>>> </span><span class="n">fruit</span> <span class="o" style="color: rgb(102, 102, 102); ">=</span> <span class="nb" style="color: rgb(0, 112, 32); ">set</span><span class="p">(fruit</span><span class="p">)</span> <span class="c" style="color: rgb(64, 128, 144); font-style: italic; "># create a set without duplicates</span></pre>
</span></i></font></pre></span></div>