Python 第2页

python–课堂

import re #1.正则表达式的两种定义方法 #(1)字符串方法: #匹配小写字母任意次 pattern = '[a-z]*'#正则表达式 print(re.match(pattern,'he123llo123'))#匹配0到第5个字符 print(re.match(pa...
iu不错哦的头像-北梦の博客iu不错哦1年前
0181

python-模板-6-11

import pymysql #1.创建学生表,插入两条数据 #数据库连接 conn=pymysql.connect(host='localhost',user='root',password='123456789',db='world') cursor=conn.cursor() # create_sql='''creat...
iu不错哦的头像-北梦の博客iu不错哦12个月前
0151

Python-pymysql建表

import pymysql zwy = pymysql.connect(host='localhost', user='root', password='123456789', db='world') cursor = zwy.cursor() create_sql = '''create table student ( sid char(10), sna...
珊瑚海的头像-北梦の博客珊瑚海12个月前
0181

Python-pymysql插入

import pymysql zwy = pymysql.connect(host='localhost', user='root', password='123456789', db='world') cursor = zwy.cursor() insert_many_sql = [('01', 'zwy', 'n'), ('02', 'yxj', 'n'...
珊瑚海的头像-北梦の博客珊瑚海12个月前
0131

Python-pymysql修改

import pymysql zwy = pymysql.connect(host='localhost', user='root', password='123456789', db='world') cursor = zwy.cursor() zwy.commit() update_sql = '''update student set sname = ...
珊瑚海的头像-北梦の博客珊瑚海12个月前
0171

Python-pymysql删除

import pymysql zwy = pymysql.connect(host='localhost', user='root', password='123456789', db='world') cursor = zwy.cursor() zwy.commit() delete_sql = 'delete from student where sna...
珊瑚海的头像-北梦の博客珊瑚海12个月前
0271

Python_模拟银行对接mysql_24.6.14

1.创建数据库和数据表 import pymysql CREATE_SCHEMA_SQL = 'CREATE SCHEMA bank' CREATE_TABLE_SQL = '''CREATE TABLE account( account_id varchar(20) not null, account_passwd char(6) not...
北梦的头像-北梦の博客SVIP北梦12个月前
0441

python_小作业_24.6.20

1.定义一个Box类,有width, height, depth三个属性,init()和get_Volume()(求体积)两个方法。其中init()方法用于获得初始化属性值,width, height, depth分别为5,6,7. (1)定义get_Volume()...
北梦的头像-北梦の博客SVIP北梦12个月前
0251
Ceph环境部署-北梦の博客

Ceph环境部署

前言 Ceph 向导 Ceph开源项目地址: https://github.com/ceph/ceph Ceph官方开发的相关项目总览: https://github.com/ceph 推荐部署方式: 早期版本(Nautilus 14.X.X版本或更早): ceph-depl...
北梦的头像-北梦の博客SVIP北梦1个月前
01181

Python_练习_24.3.8

1.写出下列题目中的pyhon语句 定义一个Employee类(员工) 在员工类中定义类属性age(年龄)为40 定义一个方法displayCount(),输出“公司最高工资” 通过类Employee修改类属性age的值=35 在方...
北梦的头像-北梦の博客SVIP北梦1年前
01199