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 =
This is same as above but does not handle errors:
s = open(filename, 'r').read()