[EDIT] Forget that - I skipped past the 'Set' part.
If you want to retrieve an item from your set, I am assuming you intend to modify its value? In which case the List data type would be much better suited.
For a list you can use the index() method.
var = ['foo', 'bar']
print var.index('bar')
http://docs.python.org/tutorial/datastructures.html
If you want to test simply whether a value is in your Set then you can use the 'in' keyword.
var = set(['foo', 'bar'])
print 'bar' in s
I think I may not have fully understood what your intention was, so forgive me if I'm pointing out the obvious!