vendredi 28 mai 2021

How to shuffle zipped list without none in output?

from random import * 

from numpy import *

a = []
l = int(input("please enter the numbers of number that you like to add to your password")) 
for i in range(l):
    s = int(input("please enter the numbers that you like to add to your password"))
    a.append(s)
print("some selected values are -", a)



b = []
m = int(input("please enter the number of alphabets that you like to have in ur password")) 
for j in range(m):
    t = input("please enter the alphabets you desire to insert to your password ")
    b.append(t)
print("the alphabets that are selected are -", b)


c = []
n = int(input("please enter the number of symbols that you like to have in your password"))
for k in range(n):
    u = (input("please enter the symbols you would like to have in your password"))
    c.append(u)
print("the symbols you desired are - ", c)
d = [a, b, c]
print(d)
u = (list(zip(a, b, c)))
print(u)
x = random.shuffle(u)
y = random.shuffle(d)
print(x)
print(y)

I actually tried to use the shuffle function in a random module and the output was shown as none. So, I please request some expert to help me out as I am learning to code for the first time.




Aucun commentaire:

Enregistrer un commentaire