ICode9

精准搜索请尝试: 精确搜索
  • print的format()用法2022-04-10 15:31:29

    # 类 ,属性,方法# class Person:# def __init__(self, name, age):# self.name = name# self.age = age # def sayhi(self):# print('my name is {},i am {} years old.'.format(self.name,self.age)) # 格式化输出# print('my

  • vs2022 搭建NET6 WebApi 接口项目《六》 返回参数配置2022-04-09 07:31:46

    1、配置Json返回格式和时间格式       #region 配置返回值格式 builder.Services.AddControllers() .AddJsonOptions(options => { //格式化日期时间格式 options.JsonSerializerOptions.Converters.Add(new DatetimeJsonCo

  • Python-day32022-04-09 00:00:50

    '''字符串利用方括号([ ])通过索引值得到对应位置的字符。Python 中索引有两种访问方式:❶ 从前往后的正向索引,n 个字符串,索引值从 0 到 n-1;❷ 从后往前的反向索引,n 个字符串,索引值从 -1 到-n。 s="I LOVE YOU "print(s[0],s[1],s[2],s[3],sep="\n")在 Python 中,可以使用切片从字符串

  • 小红书小程序x-sign值2022-04-08 14:34:26

      小红书小程序的x-sign值,用的是md5进行加密,加密的明文是去掉请求url的域名那一部分。python实现的代码如下 import hashlib id = '624d5418000000000102726e' url = "https://www.xiaohongshu.com/fe_api/burdock/weixin/v2/note/{0}".format(id) + '/single_feed' xsign = "

  • Java的日期相关类2022-04-07 22:34:25

    java.util.Date 类中提供了与系统无关的用于处理日期与时间的封装 import java.util.Date; public class Test { public static void main(String[] args) { // 1.无参:获取目前时间 Date date = new Date(); System.out.println(date); // Thu Apr 0

  • Python 字符串中引入变量2022-04-07 01:01:25

    在字符串中加入变量有三种方法:   1、+ 连字符 name = 'zhangsan' print('my name is '+name) //结果为 my name is zhangsan   2、% 字符 name = 'zhangsan' age = 25 price = 4500.225 print('my name is %s'%(name)) print('i am %d

  • Python使用tesserocr识别文字过程中遇到的一个问题2022-04-06 18:31:34

    最近在使用Python识别PNG图像中包含的文字时遇到一个问题。解决过程记录如下。 (Python使用tesserocr的安装过程不再描述。) 在使用tesserocr识别PNG图像中的文字时,如果PNG比较“干净”,背景没有噪音时,过程比较简单,代码如下: from PIL import Image import tesserocr image = Image.o

  • logging模块2022-04-05 12:02:11

    1 import logging 2 3 # 一:日志配置 4 logging.basicConfig( 5 # 1、日志输出位置:1、终端 2、文件 6 # filename='access.log', # 不指定,默认打印到终端 7 8 # 2、日志格式 9 format='%(asctime)s - %(name)s - %(levelname)s -%(module)s: %(messag

  • datetime2022-04-04 10:33:04

    datetime对象   类方法(class method) datetime.strptime(date_string, format) 返回对应于date_string的datetime对象,其中date_string基于format进行语法分析 >>> from datetime import datetime >>> dt = datetime.strptime('2022-01-01, 08:00:00', '%Y-%m-%d,

  • java-Date类2022-03-31 22:31:10

    import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; public class Javatest81 { /** * 练习1:实现一个类,打印昨天的当前时刻 */ public static void main(String[] args) throws ParseE

  • 实验1 python开发环境使用和编程初体验2022-03-30 14:03:09

    实验任务1: #print输出的几种用法 #用法1:用于输出单个字符串或单个变量 print('hey, u')#用法2:用于输出多个数据项,用逗号分隔print('hey','u')x,y,z = 1,2,3print(x,y,z)#用法3:用户混合字符串和变量值print('x1 = %d, y1 = %d, z1 = %d' %(x,y,z)) #方式1:传统C风格print('x1 = {

  • 实验1 Python开发环境使用和编程初体验2022-03-30 00:33:55

    #task1_1.py print('hey,u') print('hey','u'') x,y,z=1,2,3 print(x,y,z) print('x=%d,y=%d,z=%d'%(x,y,z)) print('x={},y={},z={}'.format(x,y,z)) print(f'x={x},y={y},z={z}') print(x) print(y) p

  • vscode-settings配置2022-03-29 20:00:20

    {     // 文字加粗     "editor.fontWeight": "bold",     "files.autoSave": "afterDelay",     "eslint.run": "onSave",     "eslint.alwaysShowStatus": true,     "editor.mouseWheelZoom"

  • 实验12022-03-29 13:03:43

    # print输出的几种用法 # 用法1:用于输出单个字符串或单个变量 print('hey, u') # 用法2: 用于输出多个数据项,用逗号分隔 print('hey', ' u') x,y,z = 1,2,3 print(x, y, z) # 用法3: 用户混合字符串和变量值 print('x = %d, y = %d, z = %d' %(x,y,z)) # 方式1: 传统c风格 print('x

  • 实验1 Python开发环境使用和编程初体验2022-03-29 12:32:40

    task1_1print('hey, u') print('hey', ' u') x,y,z = 1,2,3 print(x, y, z) print('x = %d, y = %d, z = %d' %(x,y,z)) print('x = {}, y = {}, z = {}'.format(x,y,z)) print(f'x = {x}, y = {y}, z = {z}')

  • 实验一2022-03-29 01:31:12

    1 print('hey,u') 2 3 print('hey','u') 4 x,y,z=1,2,3 5 print(x,y,z) 6 7 print('x=%d,y=%d,z=%d'%(x,y,z)) 8 print('x={},y={},z={}'.format(x,y,z)) 9 print(f'x={x},y={y},z={z}') 10 11 prin

  • 实验1 Python开发环境使用和编程初体验2022-03-28 23:32:09

    实验任务1.1: 1 print('hey,u') 2 3 print('hey','u') 4 x,y,z=1,2,3 5 print(x,y,z) 6 7 print('x=%d,y=%d,z=%d'%(x,y,z)) 8 print('x={},y={},z={}'.format(x,y,z)) 9 print(f'x={x},y={y},z={z}') 1

  • 实验1 Python开发环境使用和编程初体验2022-03-28 23:00:07

    实验任务1 task1-1.py 1 print('hey, u') 2 3 print('hey', ' u') 4 x,y,z = 1,2,3 5 print(x, y, z) 6 7 print('x = %d, y = %d, z = %d' %(x,y,z)) 8 print('x = {}, y = {}, z = {}'.format(x,y,z)) 9 print

  • 实验1Python开发环境使用和编程初体验2022-03-28 19:31:18

      print('hey, u') print('hey', ' u') x,y,z = 1,2,3 print(x, y, z) print('x = %d, y = %d, z = %d' %(x,y,z)) print('x = {}, y = {}, z = {}'.format(x,y,z)) print(f'x = {x}, y = {y}, z = {z}') print(

  • 实验1 Python开发环境使用和编程初体验2022-03-28 10:01:13

    实验任务一 task1_1.py # print输出的几种用法 # 用法1:用于输出单个字符串或单个变量 print('hey, u') # 用法2: 用于输出多个数据项,用逗号分隔 print('hey', ' u') x,y,z = 1,2,3 print(x, y, z) # 用法3: 用户混合字符串和变量值 print('x = %d, y = %d, z = %d' %(x,y,z)) # 方

  • 实验1 Python环境的使用和初体验2022-03-28 00:01:17

    ------------恢复内容开始------------ 四.实验结论 1.实验任务1 task1_1.py 1 print('hey, u') 2 print('hey', ' u') 3 x,y,z = 1,2,3 4 print(x, y, z) 5 print('x = %d, y = %d, z = %d' %(x,y,z)) 6 print('x = {}, y = {}, z = {

  • 实验1 Python开发环境使用和编程初体验.实验任务12022-03-27 22:32:54

    1 print('hey,u') 2 3 print('hey','u') 4 x,y,z = 1,2,3 5 print(x,y,z) 6 7 print('x = %d,y = %d,z = %d'%(x,y,z)) 8 print('x = {}, y = {},z = {}'.format(x,y,z)) 9 print(f'x = {x}, y = {y},z =

  • 任务一2022-03-27 21:31:25

    1 print('hey, u') 2 3 4 print('hey','u') 5 x,y,z=1,2,3 6 print(x, y, z) 7 8 9 print('x=%d, y=%d, z=%d'%(x,y,z)) 10 print('x = {}, y = {}, z = {}'.format(x,y,z)) 11 print(f'x = {x},

  • 实验1 python开发环境使用和编程初体验2022-03-27 19:34:47

    1. 实验任务1 task1_1.py # print输出的几种用法 # 用法1:用于输出单个字符串或单个变量 print('hey, u') # 用法2:用于输出多个数据项,用逗号分隔 print('hey', ' u') x,y,z = 1,2,3 print(x, y, z) # 用法3:用户混合字符串和变量值 print('x = %d, y = %d, z = %d' %(x,y,z)) #

  • 实验1 Python开发环境使用和编程初体验2022-03-27 14:35:48

    test 1_1   print 函数输出的几种用法: 1 # print输出的几种用法 2 # 用法1:用于输出单个字符串或单个变量 3 print("Hello Python!") 4 5 # 用法2: 用于输出多个数据项,用逗号分隔 6 print('Hello', ' Python!') 7 x,y,z = 11,12,13 8 print(x, y, z) 9 # 用法3: 用户混

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有