随笔分类 - python
摘要:案例2: 案例3:设置默认参数 default argument, 默认参数必须在非默认参数的后面 案例4:参数数量不确定, 案例5:包裹关键字传递
阅读全文
摘要: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
阅读全文
摘要:通过一个tcp 连接,可以传输多个http,不需要每次发起http,都建立tcp连接了 第一次发起http请求的时候,先建立tcp连接,然后通过给连接发起http请求。 第二次http请求就不需要再建立tcp连接了。从抓包中看的很清晰。 如果没有数据传输的话,65秒后自动被server拆线了
阅读全文
摘要:regular expressions (RegEx), and use Python's re module to work with RegEx 测试文档: abcafb9cuyd09pp1238a1b1ac3AbcBcd98Li86abcANi98aM Python RegEx In this
阅读全文
摘要:“Old-school” String Formatting in Python Before Python 3.6, you had two main ways of embedding Python expressions inside string literals for formattin
阅读全文
摘要:pip install mysql-connector-python
阅读全文
摘要:随机数 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
阅读全文
摘要:python3 -m pip install Django 验证安装成功 Creating a project django-admin startproject mysite This will create a mysite directory in your current directory
阅读全文
摘要: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
阅读全文
摘要:apt install python3-pip -y pip3 --version pip install pymysql
阅读全文
摘要:创建文件,并写入数据: 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
阅读全文
摘要: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
阅读全文
摘要:字符串是 Python 中最常用的数据类型。我们可以使用单引号 ' 或双引号" 来创建字符串。
阅读全文
摘要:By the way, a string is a sequence of characters. In Python, strings are enclosed inside single quotes, double quotes, or triple quotes.
阅读全文
浙公网安备 33010602011771号