Made the README examples work with Python compilers / fixed syntax.