Bifalgorithm post

Let me show you a weird Python behavior. If we repeat x 100 times, now store it in a variable called A and repeat the same for a variable called B. And if I print A is B, we will see it prints true. Here comes the interesting part. If we repeat x 10,000 times, then run it again. It should print true again. But it will print false. Now let's see another one. This prints true as x and Y both contain Python. Now if we create a new variable called Z and add this Pi into it and assign that here like this and run it again, it should print true, right? But again, it prints false. Don't forget to like and comment if you know why this happens. Follow PyCode Dev for more Python educational reels.

Let me show you a weird Python behavior. If we repeat x 100 times, now store it in a variable called A and repeat the same for a variable called B. And if I pr…

Ideas in this flowchart

  • Weird Python Behavior
  • Variable Identity
  • Repeat 'x' 100 times
  • Store in A and B
  • Print A is B
  • Output: True
  • Repeat 'x' 10,000 times
  • Output: False
  • Another Example
  • x and Y contain 'Python'
  • Add 'Pi' to Z
  • Engagement
  • Like and comment
  • Follow PyCode Dev
Feed/

Let me show you a weird Python behavior. If we repeat x 100 times, now store it in a variable called A and repeat the same for a variable called B. And if I print A is B, we will see it prints true. Here comes the interesting part. If we repeat x 10,000 times, then run it again. It should print true again. But it will print false. Now let's see another one. This prints true as x and Y both contain Python. Now if we create a new variable called Z and add this Pi into it and assign that here like this and run it again, it should print true, right? But again, it prints false. Don't forget to like and comment if you know why this happens. Follow PyCode Dev for more Python educational reels.

"Let me show you a weird Python behavior"

👍
0
0 comments0 shares

Sign in to view and post comments.