Python Language The trailing comma


Example

Like lists and tuples, you can include a trailing comma in your dictionary.

role = {"By day": "A typical programmer",
        "By night": "Still a typical programmer", }

PEP 8 dictates that you should leave a space between the trailing comma and the closing brace.