python starts with letter code example
Example 1: javascript string starts with
function startsWith(str, word) {
return str.lastIndexOf(word, 0) === 0;
}
startsWith("Welcome to earth.","Welcome");
Example 2: python startswith
str.startswith(str, beg=0,end=len(string))
Example 3: python string ends with
str = "this is string example....wow!!!";
suffix = "wow!!!";
print str.endswith(suffix)
print str.endswith(suffix,20)
suffix = "is";
print str.endswith(suffix, 2, 4)
print str.endswith(suffix, 2, 6)
Example 4: python startswith
str.startswith(prefix[, start[, end]])