Printing like a table in phyton
I have the following code: import sys import math def number(x): if x==0: return "Cero" return "Positivo" if x > 0 else "Negativo" def main(): try: list=["4","0","-12","0.0","0","-1"] #input("Please, enter only a list of number separated by a comma.If you enter another key the program will end.\n").split(",") list2=[] j=0 for i in range(len(list)): list2.append(list[i]) j+=1 list2.append(" ") list2.append(number(float(list[i]))) j+=1 a=1 print("INPUT"+" "+"OUTPUT") while a <len(list2): print(list2[a-1], list2[a]) a+=1 except ValueError: sys.exit("Invalid input. Program ends.") if __name__== "__main__" : main() I want to obtain a table like this INPUT OUTPUT 4 Positivo 0 Cero -12 Negativo 0.0 Cero 0 Cero -1 Negativo Can please someone help me?