ホームページ >バックエンド開発 >Python チュートリアル >如何理解python大法好?
目前用java-selenium-jenkins搞些测试,之前学过一点Python皮毛,但因为时间少,没深入,所以没能领会精髓;一直听说Python大法好,求解答。
<code class="language-c"><span class="kt">void</span> <span class="nf">swap</span><span class="p">(</span><span class="kt">int</span> <span class="o">&</span><span class="n">a</span><span class="p">,</span> <span class="kt">int</span> <span class="o">&</span><span class="n">b</span><span class="p">){</span>
<span class="kt">int</span> <span class="n">temp</span><span class="p">;</span>
<span class="n">temp</span> <span class="o">=</span> <span class="n">a</span><span class="p">;</span>
<span class="n">a</span> <span class="o">=</span> <span class="n">b</span><span class="p">;</span>
<span class="n">b</span> <span class="o">=</span> <span class="n">temp</span><span class="p">;</span>
<span class="p">}</span>
<span class="kt">int</span> <span class="nf">main</span><span class="p">()</span> <span class="p">{</span>
<span class="kt">int</span> <span class="n">a</span> <span class="o">=</span> <span class="mi">1</span><span class="p">,</span> <span class="n">b</span> <span class="o">=</span> <span class="mi">2</span><span class="p">;</span>
<span class="n">swap</span><span class="p">(</span><span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">);</span>
<span class="p">}</span>
</code>
没有好语言,也没有坏的语言,只有最合适的语言!