how to direct output into a txt file in python in windows
<pre><code>import itertools  

variations = itertools.product('abc', repeat=3)  
for variations in variations:  
    variation_string = ""  
    for letter in variations:  
        variation_string += letter  
    print (variation_string)  
</code></pre>

<p>How can I redirect output into a txt file (on windows platform)?</p>
