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

14
main.py
View File

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