vendredi 3 septembre 2021

What is the output of self.__x = [rand.getrandbits(1) for _ in range(0, get_number_of_inputs())]

I understand for loops or at least I think I do, however, I came across self.__x = [rand.getrandbits(1) for _ in range(0, get_number_of_inputs())] and was wondering what is the meaning of the rand.getrandbits(1) before for loop in this case.

In my cace get_number_of_inputs() is 47. My question is that what will be the output of the above-mentioned line?

Can someone please help me out?




Aucun commentaire:

Enregistrer un commentaire