Print the input and output in a table using prettyTable. from prettytable import PrettyTable import collections def printTableResult(variables, count): inputList = collections.defaultdict(list) outputList = collections.defaultdict(list) resultTable =…
使用input和raw_input都可以读取控制台的输入,input()只能接受int,float或由它们组成的表达式: Python 2.7.5 (default, Mar 19 2014, 07:24:16) [GCC 4.5.4] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> in…