1 Star 0 Fork 0

dingnate/python-example

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
52.py 290 Bytes
一键复制 编辑 原始数据 按行查看 历史
dingnate 提交于 2023-01-11 08:18 +08:00 . 修改目录名称
# coding=UTF-8
# 题目:学习使用按位或 | 。
if __name__ == '__main__':
a = 0o77
b = a | 3
print ('a | b is %d' % b)
b |= 7
print ('a | b is %d' % b)
# 二进制0b开头 八进制0o开头 十进制无开头 十六进制0x开头
c = 0b110
print (c)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/dingnate/python-example.git
git@gitee.com:dingnate/python-example.git
dingnate
python-example
python-example
master

搜索帮助