Test check for substring (x in y).

This commit is contained in:
Captain ALM 2022-11-30 17:03:29 +00:00
parent 8ae13a5e96
commit f364e348b6
Signed by: alfred
GPG Key ID: 4E4ADD02609997B1
1 changed files with 7 additions and 6 deletions

13
main.py
View File

@ -2,10 +2,11 @@
a = "hello world"
b = """hello
world"""
c = 'world hello'
c = 'world hello!'
d = '''world
hello'''
print(len(a))
print(len(b))
print(len(c))
print(len(d))
hello!'''
e = "!"
print("!" in a)
print(e in b)
print("!" in c)
print(e in d)