Yunyin's blog
  • Home
  • Archive
  • Tags
  • Categories

    { Python语法 }

  • 3比较运算符

    2022-10-05 /
    • { Python语法 }

    比较运算符

    Read On »
  • 4random模块

    2022-10-05 /
    • { Python语法 }

    random模块

    import random	#导入random模块
    <!--more-->
    random.randint(1,10) #randomint(下限,上限),返回int
    #注:交互模式会直接输出,编辑模式不会

    警告:random使用的是伪随机数,种子来源是当前系统时间

    x=random.getstate()#获取已被固定的随机数种子
    ...
    ...
    random.setstate(x)#重新设置种子进入
    #此时的随机数会被复现
  • 5数字类型&运算符

    2022-10-05 /
    • { Python语法 }

    数字类型&运算符

    数字类型

    Read On »
  • 7列表

    2022-10-05 /
    • { Python语法 }

    列表

    1.存在形式:[列表元素]

    Read On »
  • 8元组

    2022-10-05 /
    • { Python语法 }

    元组

    与列表类似,但是不支持修改元素

    Read On »
  • 9字符串

    2022-10-05 /
    • { Python语法 }

    字符串

    大小写切换方法

    Read On »
  • 学python第一天的笔记

    2022-10-05 /
    • { Python语法 }
    • { Python编程从入门到实践 }

    学python第一天的笔记

    1.hello python

    Read On »
« prev123
© 2024 - Yunyin
Powered by Hexo , Theme - Icalm