def numbered_symbols(prefix='x', cls=None, start=0, exclude=[], *args, **assumptions):
 exclude = set((exclude or []))
 if (cls is None):
  from sympy import Symbol
  cls = Symbol
 while True:
  name = ('%s%s' % (prefix, start))
  s = cls(name, *args, **assumptions)
  if (s not in exclude):
   (yield s)
  start += 1

def numbered_symbols ( prefix = 'x' , cls = None , start = 0 , exclude = [ ] , * args , ** assumptions ) : exclude = set ( ( exclude or [ ] ) ) if ( cls is None ) : from sympy import Symbol cls = Symbol while True : name = ( '%s%s' % ( prefix , start ) ) s = cls ( name , * args , ** assumptions ) if ( s not in exclude ) : ( yield s ) start += 1
generate an infinite stream of symbols consisting of a prefix and increasing subscripts provided that they do not occur in exclude .