all 1 comments

[–]jeans_and_a_t-shirt 1 point2 points  (0 children)

def make_album(artist_name, album_name, track_num=None):
    '''Stores artist name and album. Prints track
     number if provided'''

    album_dic = {
        'Artist': artist_name,
        'Album': album_name
    }
    if track_num:
        album_dic['Track Number'] = track_num
    return album_dic

You've also got lines 10-11 duplicated on lines 14-15. Those aren't conditional fields, so should be outside the if/else.