Problem Setup
Assume that the following code has run already in this session.
courses = ['CHEM 1001 10', 'CHEM 1001 11', 'BISC 1111 10', 'BISC 2207 10', 'PSC 1001 10',
'PSC 1001 11', 'PSC 1001 12', 'ANTH 3808 10', 'AMST 2071 80']
Compose your code here
for course in courses:
print(depts)
depts = []
depts.append(course_info[0])
course_info = course.split()
Python output
>>Python output here...