擅长:python、mysql、java
<p>如果您正在使用<code>Python 2.x</code>:</p>
<pre><code>response = raw_input("Enter your name:")
</code></pre>
<p>如果您正在使用<code>Python 3.x</code>:</p>
<pre><code>response = input("Enter your name:")
</code></pre>
<p><strong>替代解决方案:</strong></p>
<p>对于python 2.x:</p>
<pre><code>print("Enter your name:"),
response = raw_input()
</code></pre>
<p>对于python 3.x:</p>
<pre><code>print("Enter your name:", end="")
response = input()
</code></pre>