当前位置:网站首页>实例055:按位取反
实例055:按位取反
2022-08-10 22:20:00 【懒笑翻】
题目:学习使用按位取反~。
程序分析:~0=1; ~1=0;
~X = -X-1
代码:
print(~18)
print(~~2)
print(~-18)
运行结果:
边栏推荐
- 阿里云张新涛:支持沉浸式体验应用快速落地,阿里云云XR平台发布
- PyQt5 窗口自适应大小
- Extended Chinese Remainder Theorem
- Conditional Statements of Shell Programming (2)
- "DevOps Night Talk" - Pilot - Introduction to CNCF Open Source DevOps Project DevStream - feat. PMC member Hu Tao
- DC-9靶场下载及渗透实战详细过程(DC靶场系列)
- 这款可视化工具神器,更直观易用!太爱了
- 今日睡眠质量记录75分
- ITK 读取一个目录中的一个序列,然后改变头信息,将多张dcm图像写成一个dcm文件。
- JS use regular expressions in g model and non g difference
猜你喜欢
leetcode:357. 统计各位数字都不同的数字个数
Nodes in the linked list are flipped in groups of k
FPGA - Memory Resources of 7 Series FPGA Internal Structure -03- Built-in Error Correction Function
边缘与云计算:哪种解决方案更适合您的连接设备?
Why general company will say "go back messages such as" after the end of the interview, rather than just tell the interviewer the result?
【640. Solving Equations】
学会开会|成为有连接感组织的重要技能
shell programming without interaction
August 10, 2022: Building Web Applications for Beginners with ASP.NET Core -- Creating Web UIs with ASP.NET Core
Merge k sorted linked lists
随机推荐
交换机和生成树知识点
【640. Solving Equations】
A shell script the for loop statements, while statement
链表相加(二)
68:第六章:开发文章服务:1:内容梳理;article表介绍;创建【article】文章服务;
STL-stack
QT笔记——vs + qt 创建一个带界面的 dll 和 调用带界面的dll
The perfect alternative to domestic Gravatar avatars Cravatar
Why general company will say "go back messages such as" after the end of the interview, rather than just tell the interviewer the result?
ArcGIS应用基础知识
过滤器
Black cat takes you to learn Makefile Part 11: When the header file a.h changes, how to recompile all the .c files that depend on the header file a.h
LeetCode Daily 2 Questions 01: Reverse Strings (both 1200) Method: Double Pointer
JS中使用正则表达式g模式和非g模式的区别
What would happen if disconnecting during the process of TCP connection?
"DevOps Night Talk" - Pilot - Introduction to CNCF Open Source DevOps Project DevStream - feat. PMC member Hu Tao
pytorch tear CNN
Extended Chinese Remainder Theorem
电力系统潮流计算(牛顿-拉夫逊法、高斯-赛德尔法、快速解耦法)(Matlab代码实现)
谁是边缘计算服务的采购者?是这六个关键角色