🪴qql1's digital garden

Home

❯

笔记

❯

计算机知识

❯

python

❯

python语法

❯

python 字符串

python 字符串

2026年1月26日1分钟阅读

  • 字符串-文本-txt-字符数组
  • 操作-交互-操控
  • 文件-文档-txt文件-笔记
  • 电脑-PC-桌面端-计算机
  • 模板字符串-反引号

基本概念

child::模板字符串 child::python 字符串的索引

操作

child::

字符串操作

梗概

字符串是常量,不可直接修改

获取字符串

  • child::python str()函数
  • child::join

字符串转数组

  • child::list

查找子字符

  • child::find()
  • child::count() 元素计数
  • 字符串也可以用[数字索引]来获取字符

分割字符串

  • child::split()

大小写处理

  • child::大小写处理

字符与ascii码转换

  • child::ord()
  • child::chr()
指向原始笔记的链接


关系图谱

  • 基本概念
  • 操作

反向链接

  • python

Created with Quartz v4.5.2 © 2026

  • GitHub
  • Discord Community