I have the following javascript code
var d = Math.random(),
k = parseInt((1e3 * d)/2),
s = d + ""
output of d : 0.6715250159864421
Similarly, I have the python code that I was able to write up and as close to
d, k, s = random.random(), int((1e3*random.random()/2)), d + ''
The output are completely different.
0.8018834108596731
Am I not using the comma operator properly
PS: I understand output is going to be different, however I want to validate that my python code is correctly translated to the shown JS snippet.
question from:https://stackoverflow.com/questions/65546679/converting-javascript-function-to-python-with-comma-operator