title: data processing with python
body: <p>I am new to python so please excuse me for my question. In my line of work I have to work with tabular data represented in text files. The values are separated by either a coma or semi colon. The simplified example of such file might look as following:</p>
  
  <pre><code>City;Car model;Color;Registration number
  Moscow;Mercedes;Red;1234
  Moscow;Mercedes;Red;2345
  Kiev;Toyota;Blue;3423
  London;Fiat;Red;4545
  </code></pre>
  
  <p>My goal is to have a script which can tell me how many Mercedes are in Moscow (in our case there are two) and save a new text file Moscow.txt with following  </p>
  
  <pre><code>Moscow;Mercedes;Red;1234
  Moscow;Mercedes;Red;2345
  </code></pre>
  
  <p>I will be very thankful for your help.</p>