当前位置: 首页 > news >正文

网站做icp备案需要多久/百度营销

网站做icp备案需要多久,百度营销,网站建设知名,今天开始做魔王免费观看网站1. 简单了解模块 写的每一个py文件都是一个模块. 还有一些我们一直在使用的模块 buildins 内置模块. print, input random 主要是和随机相关的内容 random() 随机小数 uninform(a,b) 随机小数 randint(a,b) 随机整数 choice() 随机选择一个 sample() 随机选择多个 shuffle(…

1. 简单了解模块

     写的每一个py文件都是一个模块.

    还有一些我们一直在使用的模块

    buildins 内置模块. print, input

    random 主要是和随机相关的内容

        random()    随机小数

        uninform(a,b) 随机小数

        randint(a,b)  随机整数

        choice() 随机选择一个

        sample() 随机选择多个

        shuffle() 打乱

 

2. Collections

    1. Counter 计数器

    2. defaultdict 默认值字典

    3. OrderedDict 有序字典

    数据结构(队列, 栈)

        栈:先进后出

            Stack

class StackFullException(Exception):passclass StackEmptyException(Exception):passclass Stack:def __init__(self,size):self.size = sizeself.lst = []self.top = 0def push(self,el):if self.top >=self.size:raise StackFullException("超范围了")self.lst.insert(self.top,el)self.top += 1def pop(self):if self.top == 0:raise StackFullException("拿空了")self.top -= 1el = self.lst[self.top]return els = Stack(4)s.push("")
s.push("")
s.push("")
s.push("")print(s.pop())
print(s.pop())
print(s.pop())

        队列: 先进先出

         Queue

import queue
q = queue.Queue()
q.put("李嘉诚1")
q.put("李嘉诚2")
q.put("李嘉诚3")
q.put("李嘉诚4")
q.put("李嘉诚5")print(q.get())
print(q.get())
print(q.get())
print(q.get())
print(q.get())

 

3. Time模块

    时间有三种:

        结构化时间 gmtime() localtime()

        时间戳  time.time()  time.mktime()

        格式化时间 time.strftime() time.strptime()

        时间转化:

            数字 -> 字符串

            struct_time = time.localtime(数字)

            str = time.strftime("格式", struct_time)

import time
a = 32536799999
t = time.localtime(a)
s = time.strftime("%Y-%m-%d %H:%M:%S",t)
print(s)

            字符串 -> 数字

            struct_time = time.strptime(字符串, "格式")

            num = time.mktime(struct_time)

strt = input("请输入一个时间")
t = time.strptime(strt,"%Y-%m-%d %H:%M:%S")
a = time.mktime(t)
print(a)

4. functools

    wraps   给装饰器中的inner改名字

    reduce  归纳.

    偏函数   把函数的参数固定.

转载于:https://www.cnblogs.com/fu-1111/p/10181787.html

http://www.jmfq.cn/news/4759219.html

相关文章:

  • 网站网页跳转/投广告的平台有哪些
  • 3合1网站建设公司/本周国内新闻
  • 做脚垫版型的网站/长沙网站到首页排名
  • 文字壁纸做背景处理的网站/广州seo优化排名推广
  • 制作一个网站的步骤/百度联系电话多少
  • 中山网站建设/seo高手培训
  • 贵阳网站制作cncolour/网络推广员的工作内容和步骤
  • 用HBuilder做网站的模板/衡阳百度推广
  • 网站推荐男生正能量2021/站长统计是什么意思
  • xp系统做网站服务器吗/成都网站seo费用
  • 深圳专业做网站案例/百度链接收录提交入口
  • 做网站后要回源码有何用/深圳seo推广培训
  • 中贸网做的网站/免费平台
  • 平顶山网站建设/今日头条收录入口
  • 如何做网站优化 纯外链/淘宝数据分析
  • 少女论坛资源/长沙网站seo报价
  • 泰安集团网站建设多少钱/全网营销平台有哪些
  • 网站怎么更新网页内容/百度查询网
  • 在线做logo的网站/最新网站推广方法
  • 涟源网络建站/百度指数移动版app
  • 方案网站有哪些/百度认证官网申请
  • 网站建设与维护教程/泉州全网营销推广
  • 黑彩网站充值就给你做单子/跨境电商平台哪个最好最可靠
  • 做购物车网站多少钱/宁波seo外包公司
  • 北方网天津疫情/东莞seo计费
  • 网站建设技巧/宁波正规站内优化seo
  • wordpress ping/杭州seo按天计费
  • 怎么做转载小说网站/微信推广平台哪里找
  • 郑州网站建设哪个好/百度站长收录
  • 旅游网站建设策划方案书/企业品牌营销推广