输出格式美化 Python两种输出值的方式: 表达式语句和 print() 函数。(第三种方式是使用文件对象的 write() 方法; 标准输出文件可以用 sys.stdout 引用。) 如果你希望输出的形式更加多样,可以使用 str.format() 函数来格式化输出值。 如果你希望将输出的值转成 ...
分类:
编程语言 时间:
2020-04-18 13:46:11
阅读次数:
65
Python3 File(文件) 方法 file 对象使用 open 函数来创建,下表列出了 file 对象常用的函数: | 序号 | 方法及描述 | | : | : | | 1 | "file.close()" 关闭文件。关闭后文件不能再进行读写操作。 | | 2 | "file.flush()" ...
分类:
编程语言 时间:
2020-04-18 13:43:24
阅读次数:
79
Python创建HTTP服务器 创建代码 在Windows 7/10或Ubuntu上可以通过python2.x或python3.x来快速搭建一个简单的HTTP服务器 1.如果python为2.x,则可执行: $ python m SimpleHTTPServer 或 $ python2 m Simp ...
分类:
编程语言 时间:
2020-04-18 12:16:24
阅读次数:
59
#!/usr/local/Python/bin/python3#description【python3mail.py*******@qq.com主题内容】#coding:utf-8importsmtplib,sysfromemail.mime.textimportMIMETextdefsend_mail(rec_user,subject,content):smtp_host=‘smtp.163.c
分类:
编程语言 时间:
2020-04-18 09:30:20
阅读次数:
75
import datetime import time import asyncio import numba as nb import numpy as np @nb.jit() def f(n): if n<2: return 1 else: return f(n-1)+f(n-2) async ...
分类:
编程语言 时间:
2020-04-17 23:33:18
阅读次数:
83
1.日志记录Log.cs public class Log { private string Event { get; set; } private DateTime Time { get; set; } /// <summary> /// 日志记录,写入文件 /// </summary> /// ...
分类:
其他好文 时间:
2020-04-17 16:08:24
阅读次数:
75
wget https://bootstrap.pypa.io/get-pip.py python3 get-pip.py pip3 -V kali python pip3 的安装和卸载: 安装 卸载 更新 换源 需求文件requirements.txt的创建及使用 批量指定安装 ...
分类:
其他好文 时间:
2020-04-17 15:19:56
阅读次数:
202
#上传文件使用send_keys方法添加本地文件 <html> <head> <meta http-equiv="content-type" content="text/html;charset=utf-8" /> <title>upload_file</title> <script type="t ...
分类:
编程语言 时间:
2020-04-17 12:47:06
阅读次数:
86
1 #!/usr/bin/env python3 2 # -*- coding: utf-8 -*- 3 # @Time : 2019/10/14 23:37 4 # @Author : Tang Yiwei 5 # @Email : 892398433@qq.com 6 # @File : Par ...
分类:
其他好文 时间:
2020-04-17 00:49:11
阅读次数:
70
1 #!/usr/bin/env python3 2 # -*- coding: utf-8 -*- 3 # @Time : 2019/10/14 23:37 4 # @Author : Tang Yiwei 5 # @Email : 892398433@qq.com 6 # @File : Wai ...
分类:
其他好文 时间:
2020-04-17 00:25:12
阅读次数:
65