I am using the function random.choices()
in the following code:
senales=["A","B","C","D"]
probs=[0.2,0.8,0,0]
elecc = choices(senales, probs)
print(elecc)
I get as output data of this type:["B"]
What a handy way is there to get an unlisted, unchained output of the type:B
The solutions I find using intertools
are very cumbersome
Use * which will unpack the variable:
You only need to refer to what you have within the list. Try this