I just want to print some formatted output but I don't understand so I need help. Here is my code.
In list,
[dev, 1, 1999-09-08, y]
[res, 2, 2000-01-02, n]
...
Above list is inputted by user.
inputlist = []
devname = input("Device Name: ")
devcount = input("Device Count: ")
devdate = input("Production Date(ex: 1990-01-01): ")
devres = input("Stock? (y/n): ")
inputlist.append(devname+","+devcount+","+devdate+","+devres)
And now, I want to print above data.
dev 1 1999-09-08 y
res 2 2000-01-02 n
I've tried to for iteration and print but I don't have idea anymore.
for i in range(len(inputlist)):
rd = inputlist[i].split(',')
for j in range(len(rd)):
print(rd[j], sep='\t', end='')
Anyone help for me? I'm learning python at the very beginning so I don't understand very well about for iteration... Thank you very much in advance!