Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- record=['MAT', '90', '62', 'ENG', '92','88']
- course='MAT'
- >>> record = ['MAT', '90', '62', 'ENG', '92','88']
- >>> course = 'MAT'
- >>> record[record.index(course) + 1:record.index(course) + 3]
- ['90', '62']
- i = record.index('MAT')
- grades = record[i+1:i+3]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement