startswith功能
判断开始位(第一个字符)是否是某个成员(元素)
startswith用法
name = "xiaoMixiaomi"
new_name = name.startswith('x')
new_name3 = name.startswith('xiaoMixiaomi')
new_name2 = name.startswith('M')
print(new_name)
print(new_name2)
print(new_name3)
执行结果
True
False
True