随笔分类 -  python

摘要:案例2: 案例3:设置默认参数 default argument, 默认参数必须在非默认参数的后面 案例4:参数数量不确定, 案例5:包裹关键字传递 阅读全文
posted @ 2022-01-18 21:07 xman888 阅读(40) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-01-14 11:21 xman888 阅读(28) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-01-13 14:45 xman888 阅读(39) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-01-10 20:20 xman888 阅读(12) 评论(0) 推荐(0)
摘要:apt install python3-pip -y pip install grpcio python3 -m pip install grpcio-tools apt install git $ git clone -b v1.42.0 https://github.com/grpc/grpc 阅读全文
posted @ 2021-12-30 20:18 xman888 阅读(137) 评论(0) 推荐(0)
摘要:通过一个tcp 连接,可以传输多个http,不需要每次发起http,都建立tcp连接了 第一次发起http请求的时候,先建立tcp连接,然后通过给连接发起http请求。 第二次http请求就不需要再建立tcp连接了。从抓包中看的很清晰。 如果没有数据传输的话,65秒后自动被server拆线了 阅读全文
posted @ 2021-10-24 16:11 xman888 阅读(287) 评论(0) 推荐(0)
摘要:regular expressions (RegEx), and use Python's re module to work with RegEx 测试文档: abcafb9cuyd09pp1238a1b1ac3AbcBcd98Li86abcANi98aM Python RegEx In this 阅读全文
posted @ 2021-10-09 23:00 xman888 阅读(141) 评论(0) 推荐(0)
摘要:with 阅读全文
posted @ 2021-10-09 21:10 xman888 阅读(28) 评论(0) 推荐(0)
摘要:“Old-school” String Formatting in Python Before Python 3.6, you had two main ways of embedding Python expressions inside string literals for formattin 阅读全文
posted @ 2021-10-09 10:11 xman888 阅读(39) 评论(0) 推荐(0)
摘要:pip install mysql-connector-python 阅读全文
posted @ 2021-10-08 23:14 xman888 阅读(10) 评论(0) 推荐(0)
摘要:随机数 random: append: append() method only works for the addition of elements at the end of the List, for the addition of elements at the desired positi 阅读全文
posted @ 2021-10-08 22:54 xman888 阅读(43) 评论(0) 推荐(0)
摘要:python3 -m pip install Django 验证安装成功 Creating a project django-admin startproject mysite This will create a mysite directory in your current directory 阅读全文
posted @ 2021-10-08 22:27 xman888 阅读(32) 评论(0) 推荐(0)
摘要:pycharm 阅读全文
posted @ 2021-10-08 21:38 xman888 阅读(40) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2021-10-08 20:50 xman888 阅读(38) 评论(0) 推荐(0)
摘要:input How the input function works in Python : When input() function executes program flow will be stopped until the user has given an input. The text 阅读全文
posted @ 2021-10-08 20:17 xman888 阅读(88) 评论(0) 推荐(0)
摘要:apt install python3-pip -y pip3 --version pip install pymysql 阅读全文
posted @ 2021-10-08 17:11 xman888 阅读(30) 评论(0) 推荐(0)
摘要:创建文件,并写入数据: append 数据 Passing ‘w’ to the open() method tells Python to open the file in write mode. In this mode, any data already in the file is lost 阅读全文
posted @ 2021-10-08 13:47 xman888 阅读(41) 评论(0) 推荐(0)
摘要:close() function closes the file and frees the memory space acquired by that file. It is used at the time when the file is no longer needed or if it i 阅读全文
posted @ 2021-10-08 10:40 xman888 阅读(57) 评论(0) 推荐(0)
摘要:字符串是 Python 中最常用的数据类型。我们可以使用单引号 ' 或双引号" 来创建字符串。 阅读全文
posted @ 2021-10-07 21:10 xman888 阅读(53) 评论(0) 推荐(0)
摘要:By the way, a string is a sequence of characters. In Python, strings are enclosed inside single quotes, double quotes, or triple quotes. 阅读全文
posted @ 2021-10-07 19:37 xman888 阅读(33) 评论(0) 推荐(0)