Python Lesson 12: python中级面试

python字符串函数测试,你需要了解python字符串的一些函数,并且自己实现和字符串函数一样功能的函数(不能直接调用内置函数,需要自己编码实现)
这个测试方法可以很好的监测您的基础编程能力。

字符串函数 说明 需实现的函数
string.count(s) 返回 str 在 string 里面出现的次数。 my_count(s)
string.find(s) 检测 str 是否包含在 string 中, 如果是返回开始的索引值,否则返回-1 my_find(s)
string.isalnum() 如果 string 至少有一个字符并且所有字符都是字母或数字则返回 True,否则返回 False my_isalnum(s)
string.join(seq) 以 string 作为分隔符,将 seq 中所有的元素(的字符串表示)合并为一个新的字符串。 my_join(seq)
string.lower() 转换 string 中所有大写字符为小写. my_lower(s)
max(str) 返回字符串 str 中最大的字母。 my_max(str)
string.replace(str1, str2) 把 string 中的 str1 替换成 str2 my_replace(str1,str2)
string.strip([obj]) 删除 string 字符串前后的空格. my_strip(str1,str2)
string.split(str="") 以 str 为分隔符切片 string. my_split(str)

Sorry but the SQLBolt exercises require a more recent browser to run.
Please upgrade to the latest version of Internet Explorer, Chrome, or Firefox!

Otherwise, continue to the next lesson: SQL Lesson 2: Queries with constraints (Pt. 1)
Python小机器人嘴巴会打印东西,还可以拖动
练习 do it — 请完成如下任务
我不会做求助!求助!

继续努力 学下一节