Basicaly, what I have to do is to open a certain text file and output the content of it in a reversed order like this "Hello world"
---> "world Hello"
. I have written some code so far but I'm not even sure I'm on the right direction, please help me to understand what should I do next and if what I already wrote is a good start or did I totally miss it
the code is:
t = open("text.txt", "r")
n = (t.readline)
line = t.readline()
word = line.split()
a = []
a.append(word)