Random Element Selection from Five Arguments

  • Share this:

Code introduction


Selects a random element from the given five arguments and returns it


Technology Stack : random

Code Type : Function

Code Difficulty : Intermediate


                
                    
def random_choice(arg1, arg2, arg3, arg4, arg5):
    from random import choice
    return choice(arg1, arg2, arg3, arg4, arg5)                
              
Tags: