To shuffle an array randomly in Java, you can use the Collections.shuffle method.
The random module in Python provides a function called shuffle() which can be used to shuffle the elements of a list.