2017年9月11日

博客园标题背景HTML样式设置(CSS)

摘要: 点击编辑HTML源代码插入如下代码: <style><!-- h1 {background-color: #FF9933}--></style><h1><span style="font-size: 18px; font-family: 'Microsoft YaHei';">1、这是标题</spa 阅读全文

posted @ 2017-09-11 16:10 aiaiduo 阅读(258) 评论(0) 推荐(0) 编辑

进度条

摘要: 1 import sys,time 2 for i in range(50): 3 sys.stdout.write("#") 4 sys.stdout.flush() 5 time.sleep(0.1) 阅读全文

posted @ 2017-09-11 14:34 aiaiduo 阅读(85) 评论(0) 推荐(0) 编辑

文件读删除空格

摘要: 1 with open('shell','r+') as f: 2 for index,i in enumerate(f): 3 print(index,i.strip()) #Python strip() 方法用于移除字符串头尾指定的字符(默认为空格)。 阅读全文

posted @ 2017-09-11 11:37 aiaiduo 阅读(120) 评论(0) 推荐(0) 编辑

函数

摘要: 定义: 函数是指将一组语句的集合通过一个名字(函数名)封装起来,要想执行这个函数,只需调用其函数名即可 特性: 语法定义 1 2 3 4 def sayhi():#函数名 print("Hello, I'm nobody!") sayhi() #调用函数 1 2 3 4 def sayhi():#函 阅读全文

posted @ 2017-09-11 11:11 aiaiduo 阅读(124) 评论(0) 推荐(0) 编辑

导航