Question: Task 1 Given a list of courses: course, list=['BAN675,Text Mining', 'ITM330,Business Program Application', 'ITM336.JS Development and Design','ITM448, Information System Analysis'] Use regular expression to extract

Task 1 Given a list of courses: course,
Task 1 Given a list of courses: course, list=['BAN675,Text Mining', 'ITM330,Business Program Application', 'ITM336.JS Development and Design','ITM448, Information System Analysis'] Use regular expression to extract two lists: 1. the course id list: ['BAN675', 'ITM330', 'ITM336', 'ITM448"). Suppose the course id always starts with three capitalized latter, followed by three digits 2. the course name list: ['Text Mining', 'Business Program Application', 'IS Development and Design', 'Information System Analysis'). Note that the course id and the course name are always delimited by a comma. Hint: 1. for course id, use re.findallo is better 2. for course name, use re.split is better 3. remember the course. Jist is in a form of a list 4. start the program with some empty list definition, import re course, id=D course Dame and then append proper values to these lists

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related General Management Questions!