此章节练习题主要关于字符串
#字符串的find方法对于列表搜索也是不可以的!
str_test='Hi,my name is Lucy'
find_str=str_test.find('Lucy')
print(str_test," find: " ,find_str)
l=list(str_test)
"""find_list=l.find("Lucy")
print(l," find: ",find_list)
#报错信息:AttributeError: 'list' object has no attribute 'find'
"""
print()
#切片的表达式能用于列表吗?
print("切片:",str_test[:-4])
print("list切片:",l[:-4])
print()
#字符转成ASCII码 ord() 与ASCII反向转变chr()
or