how to traverse a file in python and c++ in backward way? And also store data in backward (bottom to top) way?
<p>Suppose i want to store 3 lines in a file both in python and C++ . 
I want to store it like this </p>

<pre><code>aaa
bbb 
ccc ..
</code></pre>

<p>But i am giving <code>ccc</code> input first then <code>bbb</code> then <code>aaa</code>. How will I traverse the file from bottom to top and also store from bottom to top/?</p>
