Question: 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?

Answer: 
```
print f.readline()[::-1]

```

This is a duplicate of [reverse a string in Python](https://stackoverflow.com/questions/766141/reverse-a-string-in-python)
If I understood your question, just use reverse string indexing. it should look like this:

```
s="Whatever"
print s[::-1]

```

It will then print s backwards