python studying ---- keyword and operator precedence

本文详细介绍了Python的29个关键字,包括and、class、continue等,并解释了如何使用pass保留字。此外,还概述了Python运算符的优先级,从括号和成员运算开始,到布尔连接和赋值运算结束。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Python has twenty-nine keywords:

and       def       exec      if        not       return 
assert    del       finally   import    or        try 
break     elif      for       in        pass      while 
class     else      from      is        print     yield 
continue  except    global    lambda    raise


1. use pass to hold some operation

The Operators Precedence

1. (),  .
2. **
3. *, /
4. +, -
5. <, <=, >, >=, ==, != (boolean comparatives)
6. and, or, not (boolean connective)
7. = (assignment operator)

All the operators, with the exception of the assignment and exponentiation operators, are left associative
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值