The best way that I can suggest you is that you should visit a website that has comprehensive information about the code of airport and the codes are not specified to one city but you can find information about the airport codes of the airports that are spread all over the UK. The address is following: www.ukstudentlife.com.
I can even give you the codes of some of the airports that are located in the city of London. For Heathrow Airport the code that is being used is LHR and for Gatwick Airport the code changed to LGW. In the codes the first letter signifies the area in which they are situated and the second and the third letters say that which particular airport you are describing about.
So visit the website and come to know about the codes of various airports.