import re
def f1(data):
p = re.compile('(?P<dept>[A-Z]{2,3}) (?P<num>[0-9]{3})')
return p.search(data)
obj = f1('CS 101')
dept, num = obj.group('dept'), obj.group('num')
print dept
print num
aW1wb3J0IHJlCgpkZWYgZjEoZGF0YSk6CglwID0gcmUuY29tcGlsZSgnKD9QPGRlcHQ+W0EtWl17MiwzfSkgKD9QPG51bT5bMC05XXszfSknKQoJcmV0dXJuIHAuc2VhcmNoKGRhdGEpCgpvYmogPSBmMSgnQ1MgMTAxJykKZGVwdCwgbnVtID0gb2JqLmdyb3VwKCdkZXB0JyksIG9iai5ncm91cCgnbnVtJykKCnByaW50IGRlcHQKcHJpbnQgbnVt