keep in mind dir() will return all current imports, AND variables.
if you just want your variables, I would suggest a naming scheme that is easy to extract from dir, such as varScore, varNames, etc.
that way, you can simply do this:
for vars in dir():
if vars.startswith("var"):
print vars
Edit
if you want to list all variables, but exclude imported modules and variables such as:
__builtins__
you can use something like so:
import os
import re
x = 11
imports = "os","re"
for vars in dir():
if vars.startswith("__") == 0 and vars not in imports:
print vars
as you can see, it will show the variable "imports" though, because it is a variable (well, a tuple). A quick workaround is to add the word "imports" into the imports tuple itself!