int 和 str bool 类型

Posted mlhz

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了int 和 str bool 类型相关的知识,希望对你有一定的参考价值。

1 int类型

int > str

 

 

2 bool类型

 

 

3  str类型

1) upper() 改为大写

例如:

s = "sjdklsk"

s1 =s.upper(s)

print(s1)

结果:SJDKLSK

2)lower() 改为小写

例如:

s = "SjDklsK"

s1 = s.lower(s)

print(s1)

结果:sjdklsk

3) replace() 替换

s = "小猪佩奇,胡图图,旅游"

s1 = replace("佩奇")

4) split 切割

5)startswith() 以什么开头

6) len() 字符串长度

7) index()

 

以上是关于int 和 str bool 类型的主要内容,如果未能解决你的问题,请参考以下文章

03.万恶之源-基本数据类型(int, bool, str)

关于int,bool,str

基本数据类型(int bool str)

基本数据类型 (int , bool, str)

03.Python基本数据类型(int, bool, str)

python3:基本数据类型(int,bool,str)