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

Under variable interpolation, there is nothing listed for python, but the equivalent is this:

    count = 3
    item = "ball"
    print('%(count)s %(item)ss' % locals())


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

Search: