In Ruby you can read from a file using s = File.read(filename). The shortest and clearest I know in Python is
s = File.read(filename)
with open(filename) as f: s =
contents = open(filename).read()