<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>    def binput():</div><div>        return bytes(map(ord, input()))</div><div><br></div><div>This should make Python 3-haters happy: it works perfectly, without any need for thought, as long as all of your friends are American. If not, just throw in random calls to .encode and .decode all over the place until the errors go away.</div><div><br></div><div>Sent from my iPhone</div><div><br>On Jan 25, 2016, at 13:58, Ryan Gonzalez <<a href="mailto:rymg19@gmail.com">rymg19@gmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div>Also:<br>
<br>
<br>
def linput():<br>
    'Reads a list. Completely, 100% secure and bulletproof.'<br>
    return map(eval, input[1:-1].split(',')))<br>
<br>
<br>
def ninput():<br>
    'Reads None.'<br>
    assert input() == 'None'<br>
<br>
def strinput():<br>
    'Reads a string. Also 100% secure.'<br>
    return eval("'" + input() + "'")<br><br><div class="gmail_quote">On January 25, 2016 2:04:08 PM CST, Greg Ewing <<a href="mailto:greg.ewing@canterbury.ac.nz">greg.ewing@canterbury.ac.nz</a>> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">Marcel O'Neil wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"> def intput():<br>     return int(input())<br></blockquote><br>And also<br><br>   def flintput():<br>     return float(input())<br><br>Yabba-dabba-doo-ly,<br>Greg<br><hr><br>Python-ideas mailing list<br><a href="mailto:Python-ideas@python.org">Python-ideas@python.org</a><br><a href="https://mail.python.org/mailman/listinfo/python-ideas">https://mail.python.org/mailman/listinfo/python-ideas</a><br>Code of Conduct: <a href="http://python.org/psf/codeofconduct">http://python.org/psf/codeofconduct</a>/<br></pre></blockquote></div><br>
-- <br>
Sent from my Nexus 5 with K-9 Mail. Please excuse my brevity.</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>Python-ideas mailing list</span><br><span><a href="mailto:Python-ideas@python.org">Python-ideas@python.org</a></span><br><span><a href="https://mail.python.org/mailman/listinfo/python-ideas">https://mail.python.org/mailman/listinfo/python-ideas</a></span><br><span>Code of Conduct: <a href="http://python.org/psf/codeofconduct/">http://python.org/psf/codeofconduct/</a></span></div></blockquote></body></html>