Avatar ·

How to write in Stdout and a file at the same time?

📁 python, вопрос

There is a Python script:

   import  syssys.studout =  open  ( 'my_log.log' ,  'w' )   print   'test'      

he writes the entire standard output to the file. Question: How can I write to the file and at the same time display to the console?