Shuffling Input List Function

  • Share this:

Code introduction


Shuffles the elements in the input list.


Technology Stack : random

Code Type : Function

Code Difficulty : Intermediate


                
                    
import random

def shuffle_list(input_list):
    """
    Shuffle the elements in the input list.
    """
    random.shuffle(input_list)
    return input_list

# JSON representation of the function                
              
Tags: