Test check for substring (x in y).
This commit is contained in:
parent
8ae13a5e96
commit
f364e348b6
13
main.py
13
main.py
@ -2,10 +2,11 @@
|
|||||||
a = "hello world"
|
a = "hello world"
|
||||||
b = """hello
|
b = """hello
|
||||||
world"""
|
world"""
|
||||||
c = 'world hello'
|
c = 'world hello!'
|
||||||
d = '''world
|
d = '''world
|
||||||
hello'''
|
hello!'''
|
||||||
print(len(a))
|
e = "!"
|
||||||
print(len(b))
|
print("!" in a)
|
||||||
print(len(c))
|
print(e in b)
|
||||||
print(len(d))
|
print("!" in c)
|
||||||
|
print(e in d)
|
||||||
|
Loading…
Reference in New Issue
Block a user