in these days i'm trying to make a code for to convert surname:name to name:surname in python but it doesn't works -_-
combo.txt
fiscale:marco
esposito:ronaldo
converter.py
filetxt = open("combo.txt", "r")
for combo in filetxt.readlines():
combonamesurname = combo.split(":")
name = combonamesurname[1]
surname = combonamesurname[0]
print(name + ":" + surname)
i think it's all right but when i run code he makes me this
marco:
fiscaleronaldo:
esposito
Anyone know how to help me?