美文网首页python学习笔记
python练手_53-按位异或

python练手_53-按位异或

作者: 学子CH | 来源:发表于2019-02-17 17:30 被阅读0次
# -*- coding:utf-8 -*-
# @Author: CH
"""
@project: python study
@time:2019/1/7-23:40
@file_name:【程序53】按位异或.py
@IDE:PyCharm 
@else: DO NOT STOP STUDYING!!!
"""
# 题目 学习使用按位异或 ^ 。
#
# 程序分析 0^0=0; 0^1=1; 1^0=1; 1^1=0
a=0o77
print(a^3)
print(a^3^7)

相关文章

网友评论

    本文标题:python练手_53-按位异或

    本文链接:https://www.haomeiwen.com/subject/woameqtx.html