Hi
Is there a more elegant way to re-write the code below? (Trying to generate a syntax of all string variables (except RespondentID) and variables beginning with "AB" which are then to be dropped form the datafile).
dict1 = spssaux.VariableDict(variableType='string')
dict2 = spssaux.VariableDict(pattern='^AB')
vars1 = " ".join(dict1.variables).replace("RespondentID","")
vars2 = " ".join(dict2.variables)
dropVars = vars1 + " " + vars2
#print "\n".join(dropVars)
Thanks in advance,
Jignesh