def md5sum(filen):
 with open(filen, 'rb') as fileh:
  md5 = hashlib.md5(fileh.read())
 return md5.hexdigest()

def md5sum ( filen ) : with open ( filen , 'rb' ) as fileh : md5 = hashlib . md5 ( fileh . read ( ) ) return md5 . hexdigest ( )
calculate the md5sum of a file .