summaryrefslogtreecommitdiffstatshomepage
path: root/tests/basics/string_endswith.py
blob: 683562d10c32ef0ab5d09a55a08cf9ca2108d9a6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
print("foobar".endswith("bar"))
print("foobar".endswith("baR"))
print("foobar".endswith("bar1"))
print("foobar".endswith("foobar"))
print("foobar".endswith(""))
print("foobar".endswith("foobarbaz"))

#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".endswith(1)
except TypeError:
    print("TypeError")