Complex sentence: Heinlein also ran for State Assembly in Hollywood and Beverly Hills, and was defeated in 1938, causing him to take up science fiction writing to pay of his campaign debt.
Split into simpler sentences: Heinlein also ran for State Assembly in Hollywood and Beverly Hills in 1938. He lost, causing him to take up science fiction writing to pay off his campaign debt.