I have a command lets say

f(x):
    print x

I want to create several buttons to print various numbers
so I made a list of the objects to print
when I tried to do

for x in thislist:
    bind_all(x,lambda:f(x))

which bound the buttons properly but all the buttons print the same thing.
any help?

I'm using Python2.7 and TKinter

Use functools.partial:

import functools

def f(x):
    print(x)

thislist = range(10)

actions = [functools.partial(f, x) for x in thislist]

for action in actions:
    action()

functools looks like it could be useful thanks pyTony