-3
from tabulate import tabulate
data = {
'Clients': ['Vini'],
'Foods' : ['Coca'],
'Drinks' : ['Pitu']
}
data['Clients'] = input('Digite: ')
print(tabulate(data, headers='keys', tablefmt='pretty'))
I have a question in this ICT, I wanted to add elements there with the input, but when I try, remember it is printado character by character one below the other, and not in line, anyone has how to help there? if there’s a way.
Thanks Natan, but a doubt, could I keep the elements ? for example, I put this block of code in a while True, and wanted each added element to continue to be stored there, however the . append just replaces.. have any method that makes it possible to do this? if it has not been explained too much let me know that I try to send the idea aq
– vinimvdz
You probably put the
data = { ...
while also, that is, whenever you put something new, it goes back to its original state. I edited my answer by putting while True– Natan Fernandes