Morgan Stanley interview question

When should you use python and when should you use java