Something like this maybe?
class Person(object):
def __init__(self, name, age):
self.name = name
self.age = age
def main():
p = Person("Joe Smith", 38)
attr = raw_input("Enter an attribute of a person: ")
print "The person's %s is %s." % (attr, getattr(p, attr))
if __name__ == "__main__":
main()
EDIT: Ah, I think I misunderstood your question.
Too print the contents of a variable in a string, just use the "%s" specifier and follow it with an argument.
For example:
name = "Joe"
print "Hello, %s!" % name