blob: e63ae3c1866dfec9ffef781d43d76f72e84d1da2 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
print("foobar".startswith("foo"))
print("foobar".startswith("Foo"))
print("foobar".startswith("foo1"))
print("foobar".startswith("foobar"))
print("foobar".startswith(""))
print("1foobar".startswith("foo", 1))
print("1foo".startswith("foo", 1))
print("1foo".startswith("1foo", 1))
print("1fo".startswith("foo", 1))
print("1fo".startswith("foo", 10))
try:
"foobar".startswith(1)
except TypeError:
print("TypeError")
|