Linux三剑客之 grep
前言...

Linux 三剑客之 sed 流编辑器
前言sed 是 Linux 系统中一个强大的文本处理工具,全称为 Stream EDitor(流编辑器),它可以对文本进行高效的查找、替换、删除、插入等操作,通常用于处理文本文件或管道输出的文本数据。应用场景&nbs...

Python学习第四天之字符串的拼接方式
字符串的拼接方式s1='hello's2='world'#(1)使用+号拼接print(s1+s2) #helloworld#(2)使用字符串的join()方法print(...

Python学习第四天之数据的验证
#所有字符都是数字(阿拉伯数字)print('123'.isdigit())#Trueprint('一二三'.isdigit())#Falseprint('0b1010'...

Python学习第四天之字符串的编码和解码
前言1. **跨系统和平台通信的需求** - 在计算机系统中,不同的操作系统、软件应用程序和网络协议可能使用不同的字符表示方式。例如,在Windows系统和Linux系统之间传输文本数据时,它们内部...

Python学习第四天之格式化字符串的三种方法
前言为什么需要格式化字符串输出呢?一、提高代码可读性 当需要将多个变量或数据插入到一个字符串中时,直接使用字符串拼接会使代码变得混乱,不易阅读。而使用字符串格式化,可以使代码更加简洁和易读,二、更好地控制...

Python学习第四天之字符串的常用操作
#字符串转为小写s1='HelloWorld'new=s1.lower()print(s1,new)HelloWorld helloworld#字符串转为大写...