0
I need to invert all the columns of my txt file, using python. txt file (example):
Regra n10 - exemplo
Regra n9 - exemplo
Regra n8 - exemplo
Regra n7 - exemplo
Regra n6 - exemplo
Regra n5 - exemplo
Regra n4 - exemplo
Regra n3 - exemplo
Regra n2 - exemplo
Regra n1 - exemplo
As I said, I need to reverse, getting:
Regra n1 - exemplo
Regra n2 - exemplo
Regra n3 - exemplo
Regra n4 - exemplo
Regra n5 - exemplo
Regra n6 - exemplo
Regra n7 - exemplo
Regra n8 - exemplo
Regra n9 - exemplo
Regra n10 - exemplo
There’s already a numerical order, it’s just reversed, I just need to change the order of all the lines, reverse the order of all. I’m using the Python 2.7!
the files are exactly as you are showing? You want to learn and understand how this works programmatically, or simply want someone to solve your problem?
– jsbueno
The file is well simulated, I just need to invert all, because there is already a numerical order, it is just reversed. I would just like a solution, because I will only use this once.
– Luan pedro