How do i create a brute force function in python without using any API and other library? : I know there are already some answers here. But see my code what i wanna do.

    genpass = ''

    #This is the password that we want to crack.

    psd = 'feed'

    #This is characters list. This is an array.

    chr = {'a','b','c','d','e','f','g','h'}

    def brute_force(psd, chr, genpass):
        # this function generates password
        # and check if this is match to psd or not.
       if genpass == psd:
           print('password found!', genpass)
