Zeros and Ones

  • + 1 comment

    Hi Dinesh,

    nums = tuple(map(int, input().split()))

    We are taking input as a single line and splitting it to a list of strings. Using map we are mapping each string to list of ints. We are passing lists into a tuple.

    As per numpy docs. We need to pass a tuple to numpy.zeros or numpy.ones array. In above code he is passing tuple directly to function.