Advertisement
OIQ

Untitled

OIQ
Feb 4th, 2020
181
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.56 KB | None
  1. data = []
  2.  
  3. ss = input()
  4.  
  5. while ss != "</html>":
  6.     data.append(ss)
  7.     ss = input()
  8. data.append(ss)
  9.  
  10. ans = data[:25]
  11. place = 1
  12.  
  13. for i in range(25, len(data), 9):
  14.     if data[i] != '<tr>':
  15.         break
  16.     p = []
  17.     for j in range(i + 1, i + 8):
  18.         p.append(data[j])
  19.     if (p[1].find('11') != -1):
  20.         s = '<td class="rankl">' + str(place) + '</td>'
  21.         place += 1
  22.         p[0] = s
  23.         ans.append('<tr>')
  24.         for k in p:
  25.             ans.append(k)
  26.         ans.append('</tr>')
  27.  
  28. ans += data[-8:]
  29.  
  30. for i in ans:
  31.     print(i)
Advertisement
RAW Paste Data Copied
Advertisement