from hashlib import md5

def funMD5hash(string):
  m = md5()
  m.update((string))
  md5string=m.digest()
  return md5string

str = "This is string string."
md5str = funMD5hash(str.encode())
print(md5str)