# Password generator function from random import choice eligchars = ["A", "B", "C", "D","a", "b", "c", "d", "£", "-", ">"] def pwgenerator(nochar): pw = "" for i in range(nochar): pw = pw + choice(eligchars) print ("your password of is " + pw) #print (f "your password is {pw}") ### doesnt work, wonder why? pwgenerator (int(input("please enter password length >")))