I have a website and need a name separation system: surname with list, the data stays in a txt and I normally import the data stand for example: maria: carla joao: lima I wanted to be able to separate as follows when giving this print in data he would leave it in different lists since the data are each in a line ['maria', 'carla'] and ['joao,' lima '], and also separate it from the following the first part of the code at the moment ta so, it is only separating the name of the code and the name of the code. first name: surname of list would also like to solve this:
arquivo=raw_input("Digite o nome do arquivo para separar: ")
ler=open(arquivo)
with ler as f:
for line in f:
nome, sobrenome = line.split(":")