If you're fine living in Zone 2 or 3 ( the grey concentric circles on this map: http://www.tfl.gov.uk/assets/downloads/oyster-rail-services-... ).
Then rent in London: Shared house/apt = ~£650 per month, private apt = ~£1.2k per month. Deals are to be had if you can wait for them and do the legwork... those are the averages my friends pay.
Now... on a £40k salary, the PAYE tax calculator here: http://www.listentotaxman.com/ shows that you'll be taking home £2.5k per month.
You can definitely afford London rent on £40k.
You can support someone else, on a single £40k wage, in London, in an 1-bed place (assumes you're supporting a partner).
Maybe you can't afford a car, or to eat out several times a week, or to take lots of holidays... but £40k goes pretty far and providing money isn't being spent frivolously it easily supports 2 people in 1 flat in London.
When ~£13k per annum can support 2 people, £40k is a very high standard of living for 2 people.
Ex: City (finance) contract rates of £500-£700 per day are far from uncommon, if you have finance experience. Non finance, £400+ per day is not hard to find.