Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The second example should be:

    '{} {}'.format('one', 'two')
Either way, the former example still works in Python 3.5, so that syntax hasn't gone away. `format` is preferred, though. This Stack Overflow question has some good answers as to why: http://stackoverflow.com/questions/5082452/python-string-for...


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: