mercredi 12 juillet 2017

Intendation Error in Python 3

So I have this code snippet from a Python3 script, which sadly produces a "expected indented block" error. The usual answer seems to be that you either indented wrong or mixed tabs and spaces. I checked both of those but my intendation seems fine and I am only using 4 spaces to indent, no tabs. Anyone got an Idea whats wrong?

for submission in submissions:
    currentUser = submission.author.name
    if currentUser in uniqueUsers:
        # Do Nothing
    else:
        uniqueUsers.append(currentUser)

for user in uniqueUsers:
    print(user)

Aucun commentaire:

Enregistrer un commentaire