S&P Global interview question

To write a code to give primary numbers using python