Python—>(1)最基础

数据结构

数据类型

  • 整数
  • 浮点数
  • 布尔值
  • 空值:None
  • 字符串:1)’hello world’ :用引号包裹,单双均可;2)多行用三引号;3)索引从0开始;4)注释:#; 5)format()函数的使用:print(‘My name is {},and my number is {}'.format(name,number))等价于print('My name is '+name+',and my number is'+number)
  • 变量

函数

  • print(): eg., print('hello')
  • input(): eg., number=input('请输入你的学号:')

运算符

  • 算数
  • 比较
  • 赋值
  • 逻辑
发布了33 篇原创文章 · 获赞 1 · 访问量 1257

猜你喜欢

转载自blog.csdn.net/weixin_44783002/article/details/104477205
今日推荐