Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

7
  • \$\begingroup\$ This would also save 2 bytes in python3 because you could discard the end parameter. \$\endgroup\$ Commented Nov 2, 2015 at 21:24
  • \$\begingroup\$ @Skyler You're absolutely correct. \$\endgroup\$ Commented Nov 2, 2015 at 21:34
  • \$\begingroup\$ How does this work in Python 3, which needs parens for print? \$\endgroup\$ Commented Nov 2, 2015 at 21:36
  • \$\begingroup\$ Python 3 should be print(open(__file__).readline()) followed by a newline. \$\endgroup\$ Commented Nov 2, 2015 at 21:37
  • \$\begingroup\$ Your Python 3 example says Python 2 rather than Python 3 \$\endgroup\$ Commented May 25, 2016 at 22:39