Sir Paul McCartney used to write a song with John Lennon in three hours.
The two musicians were behind most of The Beatles hits, and Paul says during their 60s heyday they could write a hit in a matter of hours.
He said: "I'm lucky, because the way I used to write with John, it was normally a three-hour affair. It was never much longer than that.
"It depends how lucky you get. If you're lucky, it's pure inspiration. Those are great, because they just sort of fall out and you can't believe you're writing it so easily. Then some of them, it's 50-50, where you get a sense that you're having to work at it."
Paul says one of his most famous tracks, 'Yesterday', came to him in a dream, but he walked around with the melody in his head for a number of weeks before writing the song properly as he was convinced it was someone else's track.
He added: "There were oddities such as 'Yesterday', which I dreamt. I thought I was dreaming someone else's song. I wrote the words on a car journey while on holiday in Portugal, during a three-hour drive from Lisbon to the south coast, where I was staying in [The Shadows'] Bruce Welch's flat.
"Bruce, not so long ago, said to me, 'The first thing you said was, 'Have you got a guitar?' So there I was singing it, and he couldn't believe it. So he was the first person in the world to hear Yesterday."