• + 5 comments

    unkempt pubes:

    [print(sum(i) / len(i) ) for i in zip( *[map(float, input().split()) for _ in range(int(input().split()[1])) ] ) ]
    
    • + 3 comments

      what does the [1] after split() do??

      • + 1 comment
        [deleted]
        • + 0 comments

          here is solution of problem Zipped in python 2 and python 3 https://solution.programmingoneonone.com/2020/06/hackerrank-zipped-problem-solution-python.html

      • + 0 comments

        as the input for number of students and subjects is given in same line, OP is spliting the input string into list and taking 2nd element of the list to iterate those many times.

      • + 0 comments

        here is problem solution in python programming. https://programs.programmingoneonone.com/2021/02/hackerrank-zipped-solution-python.html

    • + 3 comments

      what does the [1] after split() do??

      • + 0 comments

        .split()returns list. [n] returns n-th element of that list.

        >>> 'hello world'.split()
        ['hello', 'world']
        >>> 'hello world'.split()[1]
        'world'
        
      • + 0 comments

        It's a shortcut of skipping the first input (number of subjects) and going straight for the number of students

      • + 0 comments

        Updated solution is here

        https://www.thecscience.com/2021/08/hackerrank-Zipped-in-python-problem-solution.html

    • + 0 comments

      nyc solution!!!!!!!!!!

    • + 0 comments

      Bad practice to use list comprehensions/map for printing items, better use for loop.

    • + 0 comments

      readability is highly decreased here.