Inline list average

    0

    20

    Python public recipes

    The code calculates the average name in the list of user input and stores it in the variable 'averageName'. The code then calculates the sum of all the user input and divides it by the length of the list of user input.

    Shortcut: list.average

    averageName = sum(listName) / len(listName)
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    Legal
    • Security
    • Privacy Policy
    • Code Privacy
    • Terms of Service
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.