Advertisement
Guest User

Untitled

a guest
Sep 30th, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. record=['MAT', '90', '62', 'ENG', '92','88']
  2.  
  3. course='MAT'
  4.  
  5. >>> record = ['MAT', '90', '62', 'ENG', '92','88']
  6. >>> course = 'MAT'
  7. >>> record[record.index(course) + 1:record.index(course) + 3]
  8. ['90', '62']
  9.  
  10. i = record.index('MAT')
  11. grades = record[i+1:i+3]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement