averageName = sum(listName) / len(listName)
      Python language logo

      Inline list average

      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

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.