我在python中设计一个表,我对标题有点麻烦。这是我现在的代码:
x = ["4","5","6","7"]
y = ["1","2","3","4"]
z = ["0","1","2","3"]
def Printtable():
for row in zip(x,y,z):
print ' '.join(row)
userinput = int(input("Input:"))
if userinput == 1:
Printtable().
我希望输出如下:
Denary Binary Hex
0 0000 0
1 0001 1
2 0010 2
等
答案 0 :(得分:0)
print ' '.join('xyz')
?很难说你想得到什么。