I already asked this before, but I made the question way too convoluted so I got answers that I can't use(this is for a uni project, so try not to import stuff). So, I have a list in a .txt like this:
num_cliene, store, name, surname, location
11, 2, LISA, ANDERSON, Evora
13, 2, KAREN, JACKSON, Lisbon
4, 2, BETTY, WHITE, Seixal
I need to access this data in a way that I can input a client number and it gives me their surname/location whatever, so far I was able to make a string
def listagerador():
clientesfich=open("clientes.txt", "r")
listacli = ""
for line in clientesfich:
listacli+=line
I can easily make it a tuple or list, but I fond string more convenient(but is it really?).
So, to summarize, how can I easily find some info given some info? Thanks.