I want to make a program that reads a text file from my directory and prints out the words backwards.
for example: My text file contains this sentance: "Others follow the British historian A. J. P. Taylor"
using this code:
f=open('c:/Python27/ww2.txt','r')
print f.readline()
it will print this: "Others follow the British historian A. J. P. Taylor"
What I want to print is this: "rolyaT .P.J.A niarotsih hsitirB eht wollof srethO"
How can I accomplish this?