The program uses the random module in Python to shuffle the elements of a list nums.
So, each time the program runs, the elements of the list nums are shuffled randomly and printed to the console. The output will be a shuffled list of the integers ranging from 10 to 100 with a step of 10.
import random nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100] random.shuffle(nums) print(nums)
[30, 50, 70, 60, 10, 100, 40, 90, 80, 20]
Learn All in Tamil © Designed & Developed By Tutor Joes | Privacy Policy | Terms & Conditions