This returns such a random vector of a given size. However, note that its elements belong to the semi-open interval $\left[0~1\right)\subset\mathbb{R}$, not the closed interval $\left[0~1\right]\subset\mathbb{R}$ :
sage: def randvect(size=4):return vector([random() for t in range(size)])