I was in the process of creating a simple program to generate a password with a 'List' consisting of numbers, symbols, and characters. In the process, I wanted to randomize and shuffle them. I used the random.shuffle method to shuffle the list. My question (Sorry, very new to Python) - why cannot we store the outcome of a shuffle activity into a variable. Giving an example here.
mylist = ["apple", "banana", "cherry"]
shufflefinal = random.shuffle(mylist)
(Why cannot we store the random.shuffle(mylist) into a variable shufflefinal) What is the rule here ? I understand how to get the outcome but wanted to understand the difference and the logic on why this cannot be stored and retrieved through a variable .
Your insight would be valuable .