Test string slicing.

This commit is contained in:
Captain ALM 2022-11-30 17:06:34 +00:00
parent 16f377a2ef
commit d9f24706ac
Signed by: alfred
GPG Key ID: 4E4ADD02609997B1
1 changed files with 4 additions and 10 deletions

14
main.py
View File

@ -1,12 +1,6 @@
#String tests #String tests
a = "hello world" a = "hello world"
b = """hello #[lw_inc:up_exc]
world""" print(a[2:8])
c = 'world hello!' print(a[:8])
d = '''world print(a[2:])
hello!'''
e = "!"
print("!" not in a)
print(e not in b)
print("!" not in c)
print(e not in d)