I was starting with the google app engine and was trying some quick learning.I stumbled across this issue which does not occur on my local development environment.Here is the code
import random, math
random.seed()
quotesArray=[]
quotesArray.append("This is a Test1")
quotesArray.append("This is a Test2")
quotesArray.append("This is a Test3")
quotesArray.append("This is a Test4")
quotesArray.append("This is a Test5")
x = int(math.floor(random.random()*343)+1)
print quotesArray[0]+" "+str(x)
On my development environment the output is
This is a Test1 45
On the live site the output is
45
Can anyone please provide me some idea on why would this be so?
I got through a solution to this problem myself
Instead of
printcommand, we have to usesys.stdout.write('text to print')You need to
import sysfor the above to work.