擅长:python、mysql、java
<p>好像你想要这样的东西</p>
<pre><code>>>> l = ['12', '3', '4']
>>> def mul(num1, num2):
if num1 in l and num2 in l:
return str(int(num1)*int(num2))
else:
return 'Number you specified is not present in the list. Please try again'
>>> print(mul(input('Print the num1 : '), input('Print the num2')))
Print the num1 : 1
Print the num2 : 7
Number you specified is not present in the list. Please try again
>>> print(mul(input('Print the num1 : '), input('Print the num2 : ')))
Print the num1 : 3
Print the num2 : 12
36
</code></pre>