2014-05-24 23:46:51 +04:00
|
|
|
print("foobar".endswith("bar"))
|
|
|
|
print("foobar".endswith("baR"))
|
|
|
|
print("foobar".endswith("bar1"))
|
|
|
|
print("foobar".endswith("foobar"))
|
|
|
|
print("foobar".endswith(""))
|
2015-03-15 00:20:58 +03:00
|
|
|
print("foobar".endswith("foobarbaz"))
|
2014-05-24 23:46:51 +04:00
|
|
|
|
|
|
|
#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))
|
2017-08-29 00:06:21 +03:00
|
|
|
|
|
|
|
try:
|
|
|
|
"foobar".endswith(1)
|
|
|
|
except TypeError:
|
|
|
|
print("TypeError")
|