0

I am a beginner in python and the question is pretty much what is stated in the title. Hoping for a good explanation.

  • 1
    you compare string with integer, to get it right use `print(int('1')==1)` – Zaraki Kenpachi Feb 13 '20 at 07:07
  • 4
    For the same reason a photo of an apple and an apple taste differently: they are not the same thing. The only reason you might expect them to be the same is because you are used to some languages that "helpfully" convert values for you — but note that _that_ is the extra behaviour (which Python does not have). – Amadan Feb 13 '20 at 07:07
  • 1
    Python is a strongly-typed language, so it does not implicitly convert between numbers and strings like Javascript or PHP do. – kaya3 Feb 13 '20 at 07:11

0 Answers0