>> Python中的运算符 [英] >> operator in Python

查看:83
本文介绍了>> Python中的运算符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

>>运算符的作用是什么?例如,以下操作10 >> 1 = 5做什么?

What does the >> operator do? For example, what does the following operation 10 >> 1 = 5 do?

推荐答案

这是正确的移位运算符,将所有位右移"一次.

It's the right bit shift operator, 'moves' all bits once to the right.

二进制10是

1010

右移到它

0101

是5

这篇关于>> Python中的运算符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆