QuestionQ42Verified/Python BasicsCopy linkReport a problemAsk AstroTutorSave questionWhat is the output of this line of code entered in a Python interactive session? >>> print(~100) A~100B-101C100Show AnswerAnswerExplanationPython’s unary bitwise-inversion operator follows the identity ~n == -(n + 1) for integers. Thus, ~100 evaluates to -101, and print outputs that value.Show comments0Show commentsCommunity DiscussionNo comments yet. Be the first to start the discussion!
Community Discussion