HSBC interview question

Tough Python Questions on Sequencing