Airbus interview question

How do you write to a file in python