This program imports the "random" module and uses the "choice" function to randomly select and print one element from the list "animal". The list "animal" contains a list of strings representing different animals. The "random.choice" function is used to randomly select one element from the list and print it. The output will be a random animal from the list each time the code is run.
import random animal = ["Cat", "Dog", "Elephant", "Fox", "Tiger", "Lion", "Ponda"] print(random.choice(animal))
Fox
Learn All in Tamil © Designed & Developed By Tutor Joes | Privacy Policy | Terms & Conditions