10.9 python笔记

对象:ID、Type、Value
变量
保留字

and      elif     import  raise   global
as       else     in      return  nonlocal
assert   expect   is      try     True
break    finally  lamba   while   False
class    for      not     with    None
continue from     or      yield
def      if       pass    del

2)数据类型:
      Numbers-------数字
      Strings-------字符串 +链接 *复制
      List----------列表
      Tuples--------元组
      Dictionaries--字典
      Sets----------集合

数字
      Integers----------------整型 
      Boolleans---------------布尔型
      Floating point numbers--浮点型
      Complex numbers---------复数

3)类型转换
  int()
  bin()

4)语句
      赋值语句--变量名=变量值
      

                  |--顺序结构
      结构化语句--|--分支(选择)结构 if:(条件) 语句块 elif:(条件) 语句块
                  |--循环结构 for 变量 in range()/字符串/列表
                              while 条件: 语句块
                              else: 语句块
                              break:终止循环 跳出
                              continue:终止循环 继续
5)函数
      变量名-- input(“提示字符串”) 其他类型需要转换
      评估函数--eval (“字符串或字符串变量”)去掉参数最外侧引号并执行余下语句的函数
      print()格式化
      print()
           格式:print (value,...,sep='',end='\n',file=sys.stdout,flush=False)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值