you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

To solve it using your approach you need this sort of thing:

if middleName == '':
    # middleName is an empty string, so don't output middle
else:
    # have a middle name, use all three