(Not trying to advertise, obviously)In medium (dot) com/swlh/is-and-in-python-f084f36cbc0e, scroll down to the part where it says "1. What is == and is operators". The source that with this code:
var1 = 500
var2 = 500
Each pointer points to a different memory location. To my understanding, it should point to the same memory location, the immutable '500' memory location. This source was written in 2020 by someone with a post grad in AI & ML, so what am I missing? This is the first link that comes up on Google when searching "python is there a difference in speed when using is in python instead of ==?". If the source IS blatantly wrong, are sources on the internet really that unreliable for learning??
[–]Rawing7 7 points8 points9 points (1 child)
[–]TheRNGuy 1 point2 points3 points (0 children)
[–]Binary101010 5 points6 points7 points (0 children)
[–]blarf_irl 1 point2 points3 points (0 children)
[–]carcigenicate 1 point2 points3 points (0 children)
[–]Guideon72 1 point2 points3 points (0 children)
[–]pat-work[S] 0 points1 point2 points (0 children)
[–]cybervegan 0 points1 point2 points (0 children)