I have a list such as : {1,3,6}, then, I want to get all the orders of it, I do not know which function is easier. I have to try this code, but it is complex.
a={1,3,6};
b=Table[0,6];
b[[1]]=a;
b[[2]]={a[[2]],a[[3]],a[[1]]};
b[[3]]={a[[1]],a[[3]],a[[2]]};
b[[4]]={a[[2]],a[[1]],a[[3]]};
b[[5]]={a[[3]],a[[1]],a[[2]]};
Such that. I want to get a simple code for this.