assert var == 0 1

assert var == 0

assert var != 0

Here is what the above code is Doing:
1. We’re creating a variable called var and assigning it the value of 0.
2. We’re creating a function called my_function that takes no arguments.
3. Inside the function, we’re creating a variable called var and assigning it the value of 1.
4. We’re printing the value of var.
5. We’re calling the function.
6. We’re printing the value of var.
7. We’re asserting that the value of var is not equal to 0.

What do you think the output of this code will be?

Similar Posts