Complex sentence: From 1936 to 1991, it was the capital of Kazakh SSR, and from 1991 to 1997, it was the capital of Kazakhstan.
Split into simpler sentences: From 1936 to 1991, it was the capital of Kazakh SSR. From 1991 to 1997, it was the capital of Kazakhstan.