import hashlib def hashit(inp): return hashlib.md5(inp.encode('utf-8')).hexdigest() from_var = 'helloworld' with open('input.txt', 'r') as fo: from_file = fo.read() print(f' from_file : { repr(from_file) }') print(f' from_var : { repr(from_var) }') print(f' from_file hash : { hashit(from_file) }') print(f' from_var hash : { hashit(from_var) }')
helloworld
Description
Edit input.txt nad delete second line, and run hashit.py again: