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

13
main.py
View File

@ -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)