Another collective command is the broadcasting command bcast. In contrast to scatter it is used to send the same data to all processors. Its call is similar to that of scatter:
data = comm.bcast(data, root=0)
but it is the total data and not a list of portioned data that is sent. Again, the root processor can be any processor. It is the processor that prepares the data to be broadcasted.