Yes, it is a good idea to wear long pants or skirts for Topkapi Palace.