Print String

Balaji balaji at
Tue Jun 1 20:13:29 CEST 2004

Hello Eveybody,

I have written a method which prints the prefix notation of any expression.

here is the method...

def PrintPrefix(expr):
		if expr.__class__==E:
			print expr.operator,
                         print expr,

Now if i pass an expression to it like e1=x+y+z:

I call it by passing PrintPrefix(e1):
The output is ++xyz

now i want to store this in a string...

Can anyone help....


More information about the Python-list mailing list