Cisco interview question

Code for Stack Splitting functions as i said i knew python too Scrapping questions