Oct-07-2017, 07:32 PM
Hey fellow users! I just started learning Python a few weeks ago via the 'Beginning Programming wit Python for Dummies' book. I am currently on operators. And for this thread, I am currently on the 'Identity Operators': is, not. And I have a basic understanding. If I'm correct, say: 'type(2) int' results in 'True' because the 'type' of data '2' is an integer.
But I tried just typing:
'int is True'
False
Also I tried:
'int is False'
False
Why is that?
Is this because if 'is' in the statement 'int is True' is an operator, and 'int' and 'True' are the operands, the left operand is always False? So, 'int(False) is True(True) results in False because 'int is False', not True. But then what about 'int is False'? Why does that result in False?
I hope this makes sense.
Also, I'm new to this forum, and forums in general. And this is actually my first thread. So, a few questions.
1. Is this the right topic (Python Forum section) to put this thread?
2. What are some other: techniques, tips, lessons I could and should start learning in regard to Python, but specifically operators for now.
3. Is there something I should be learning rather than operators?
4. Do I have the right forum "syntax"? Is this thread the right format, and how I could improve it? Am I using the right terminology?
Thanks, for all the support I've already seen by users on this Forum. I am really excited to invest in Python and its community and learn more!
But I tried just typing:
'int is True'
False
Also I tried:
'int is False'
False
Why is that?
Is this because if 'is' in the statement 'int is True' is an operator, and 'int' and 'True' are the operands, the left operand is always False? So, 'int(False) is True(True) results in False because 'int is False', not True. But then what about 'int is False'? Why does that result in False?
I hope this makes sense.
Also, I'm new to this forum, and forums in general. And this is actually my first thread. So, a few questions.
1. Is this the right topic (Python Forum section) to put this thread?
2. What are some other: techniques, tips, lessons I could and should start learning in regard to Python, but specifically operators for now.
3. Is there something I should be learning rather than operators?
4. Do I have the right forum "syntax"? Is this thread the right format, and how I could improve it? Am I using the right terminology?
Thanks, for all the support I've already seen by users on this Forum. I am really excited to invest in Python and its community and learn more!