摘要:
1 import numpy as np 2 # 手动创建数组 3 # array = np.array([1,2,3]) 4 # array = np.array([[1,2,3],[4,5,6]],dtype=int) 5 # array = np.array([[1,2,3],[4,5,6]] 阅读全文
摘要:
1、所谓的列表推导式,就是指的轻量级循环创建列表: a = [i for i in range(1,10)] # [1, 2, 3, 4, 5, 6, 7, 8, 9] b= [11 for i in range(1,10)] # [11, 11, 11, 11, 11, 11, 11, 11, 1 阅读全文
摘要:
一、创建数据库实例 1 from pymysql import * 2 # 创建数据库实例 3 #1.建立数据库连接 4 conn = connect(host="192.168.20.101",user="root",password="123456") 5 # 2.获取游标对象 6 mycur 阅读全文