simple python music quiz
Note: Not an answer, an extended comment.

There's no way your code can work the way you intend it to.


Your leader board doesn't work when the user isn't already in the leader board.

The second line will IndexError in these cases:


index_row_list = [leaderboard.index(row) for row in leaderboard if username in row]
index_row = int(index_row_list[0])


You can never score more than 3 points on the leader board.


while not guessed_wrong_twice:
    result = start_quiz()
    guessed_wrong_twice = result[1]
score = result[0]


You can never enter a correct song.


if guess.lower == song_chosen[0]:



Looks innocent enough, but it's never true. Unless song_chosen[0] is str.lower. In which case it's always true.

&gt;&gt;&gt; 'abc'.lower == 'abc'
False



Now 1 &amp; 2 are pretty minor, so if your code only contained them I'd just answer. But 3 means it's impossible for your code to work.

Given that start_quiz was the last function I reviewed I have a half written review for you. Please fix the above problems for it.