Manchester City boss Pep Guardiola says his rivalry with Jose Mourinho pushed him to become a better manager.