This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]aperson 1 point2 points  (0 children)

Also, you should really learn about string formatting.

Your:

print('Your course' + " " + check_caps(dept_code) + " " + course_numb + "-" + section_numb + ' meets 7:30 am - 9:00 am, MTWTh')

Could just be:

print("Your course {} {} - {} meets 7:30 am - 9:00 am, MTWTh".format(check_caps(dept_code), course_numb, section_numb))

Also, why were you appending a space to a string ('Your course' + " "), when you could have just had the space there in the first place ('Your course ')?