I have a command lets say

    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:

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):

thislist = range(10)

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

for action in actions:

functools looks like it could be useful thanks pyTony