当前位置:网站首页>实例055:按位取反
实例055:按位取反
2022-08-10 22:20:00 【懒笑翻】
题目:学习使用按位取反~。
程序分析:~0=1; ~1=0;
~X = -X-1
代码:
print(~18)
print(~~2)
print(~-18)
运行结果:
边栏推荐
- An article to teach you a quick start and basic explanation of Pytest, be sure to read
- Qualcomm Platform Development Series Explanation (Application) Introduction to QCMAP Application Framework
- 亲测有效|处理风控数据特征缺失的一种方法
- Shell programming specification and variables
- port forwarding
- 从斐波那契 - 谈及动态规划 - 优化
- 服务——DHCP原理与配置
- 诺诚健华通过注册:施一公家族身价15亿 高瓴浮亏5亿港元
- 2021IDEA创建web工程
- Introduction to the use of counter instructions in Rockwell AB PLC RSLogix5000
猜你喜欢
ThreadLocal comprehensive analysis (1)
OneNote 教程,如何在 OneNote 中整理笔记本?
68: Chapter 6: Develop article services: 1: Content sorting; article table introduction; creating [article] article services;
A shell script the for loop statements, while statement
Service - DHCP principle and configuration
链表相加(二)
shell脚本
测试4年感觉和1、2年时没什么不同?这和应届生有什么区别?
虚拟地址空间
Shell 编程--Sed
随机推荐
Merge k sorted linked lists
BM13 determines whether a linked list is a palindrome
今日睡眠质量记录75分
阿里云架构师金云龙:基于云XR平台的视觉计算应用部署
BM7 链表中环的入口结点
ThreadLocal comprehensive analysis (1)
华为HCIE云计算之Fusion Access桌面云
What is Jmeter? What are the principle steps used by Jmeter?
12 Recurrent Neural Network RNN2 of Deep Learning
RK3399 platform development series explanation (kernel-driven peripherals) 6.35, IAM20680 gyroscope introduction
Conditional Statements of Shell Programming (2)
port forwarding
68:第六章:开发文章服务:1:内容梳理;article表介绍;创建【article】文章服务;
德科立科创板上市:年营收7.3亿 市值59亿
Research on multi-element N-k fault model of power system based on AC power flow (implemented by Matlab code) [Power System Fault]
ASCII, Unicode and UTF-8
Nodes in the linked list are flipped in groups of k
美味的石井饭
gcc492 compile `.rodata‘ can not be used when making a PIE object; recompile with -fPIE
从斐波那契 - 谈及动态规划 - 优化