Python reading file
<p>How would I find out how many attempts have been made to login with the root account?</p>

<p>Here is the code I am using so far in python:</p>

<pre><code>myFile = open('file','r')
count_rr = 0
for line in myFile.readlines():
    list_of_line = line.split(' ')
    if 'root' in list_of_line[?]
            print 'root'
            count_rr = counter_rt + 1
</code></pre>

<p>Here are two lines of the file I am trying to read:</p>

<pre><code>Jan 10 09:32:46 j4-be03 sshd[3885]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=218.241.173.35  user=root
Jan 10 09:32:48 j4-be03 sshd[3885]: Failed password for root from 218.241.173.35 port 50212 ssh2
</code></pre>
