Monday 26 August 2019

python - Calling type(1/2) returns integer?

Answer



So I noticed that calling :




print type(1/2) 


returns an integer, however shouldn't it be a float?

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...