擅长:python、mysql、java
<p>在这一行中,您使用三个参数调用了<code>input</code>函数:</p>
<pre><code>choice1 = input('''Oh, you. .... I am''', giant, ''', and ''').lower()
</code></pre>
<p>如果要将字符串变量<code>giant</code>的内容放入用户看到的字符串中,可以使用字符串串联:</p>
<pre><code>input('Oh, you. You are finally awake. You have been out cold '
'for the last 10 hours! I am ' + giant + ', and I will be '
'your guide in defeating the dark lord Thaldmemau.'
'''Well, shall we get to it?
A: Where am I?
B: Ok, we will go!
C: Who are you again?)'''
</code></pre>
<p>或字符串格式:</p>
<pre><code>input('''Oh, you. You are finally awake. You have been out cold
for the last 10 hours! I am {giant}, and I will be your guide in
defeating the dark lord Thaldmemau. Well, shall we get to it?
A: Where am I?
B: Ok, we will go!
C: Who are you again?)'''.format(giant=giant))
</code></pre>