I am new to coding and have ran into a problem trying to encode a string.
>>> import hashlib
>>> a = hashlib.md5()
>>> a.update(\'
It's not working in the REPL. It's hashed nothing, since you've passed it nothing valid to hash. Try encoding first.
3>> hashlib.md5().digest()
b'\xd4\x1d\x8c\xd9\x8f\x00\xb2\x04\xe9\x80\t\x98\xec\xf8B~'
3>> a = hashlib.md5()
3>> a.update('hi'.encode('utf-8'))
3>> a.digest()
b'I\xf6\x8a\\\x84\x93\xec,\x0b\xf4\x89\x82\x1c!\xfc;'