Zeros and Ones

  • + 0 comments

    import numpy as np

    def zero_one(x): list_zero_one = ['zeros','ones'] for i in list_zero_one: func = getattr(np, i) print(func(tuple(x), int))

    inputs = list(map(int, input().split())) zero_one(inputs)