Complex sentence: The song was recorded in 1967 during the sessions for "Sgt. Pepper's Lonely Hearts Club Band" but was omitted from that album, and first featured in the Beatles' 1968 animated movie "Yellow Submarine" and its soundtrack album released early the following year.
Split into simpler sentences: The song was recorded in 1967 during the sessions for "Sgt. Pepper's Lonely Hearts Club Band" but was omitted from that album. It was first featured in the Beatles' 1968 animated movie "Yellow Submarine" and appeared on its soundtrack album, released early the following year.