fork download
  1. with open('page.txt','r') as f:
  2. s=f.read()
  3. pat="""
  4. India
  5. </td>"""
  6. l=s.split(pat)
  7. st=set()
  8. tot=0
  9. for x in l:
  10. x.split("""<td role="gridcell">""")
  11. x=x[20:100]
  12. pos=x.find("""</td><td role="gridcell">""")
  13. st.add(x[:pos])
  14.  
  15. print 'Total no. of teams = ' + str(len(st))
  16.  
  17. for x in st:
  18. print x
Runtime error #stdin #stdout #stderr 0.01s 7848KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "prog.py", line 1, in <module>
IOError: [Errno 2] No such file or directory: 'page.txt'