I can embed variables using the print statement in python in this way
i=10
print "Value is %s" % (i)
Output
Value is 10
but doing this
i=10
sys.stdout.write ("Value is %s") % (i)
gives me the following error
TypeError: unsupported operand type(s) for %: 'NoneType' and 'int'
Can I embed variables using sys.stdout.write instead of print?