I'm trying to call a variable as bytes but I couldn't able to call it, there is a little part of it
 else:
    generated_password = randomString(random_string)
    key = open(input("Please enter your key file"), 'rb').read()
    f = Fernet(key)
    enc_password = f.encrypt(b'generated_password')
Problem its encrypting the name of the variable rather than what it store I quickly look online but couldn't find any related example. If you know how can you please kindly explain?