擅长:python、mysql、java
<p>你不能从cd3}中得到一个完整的{cd3}元素,因为你不能从cd3}中得到一个。您只需编写三个<code>if-elif</code>语句来检查每个语句。简短的例子(你应该从这里得到答案)</p>
<pre><code>>>> varOne = 2
>>> varTwo = 3
>>> varThree = 4
>>> from random import choice
>>> testVar = choice([varOne, varTwo, varThree])
>>> if testVar == varOne:
print 'abc'
elif testVar == varTwo:
print 'def'
else:
print 'ghi'
abc
</code></pre>