class Test def main is shared # slice a dynamic receiver x as dynamic = 'aoeu' assert x[0:2] == 'ao' assert x[2:] == 'eu' # slice with dynamic args i as dynamic = 0 j as dynamic = 2 assert x[i:j] == 'ao' assert x[i:] == 'aoeu' assert x[:j] == 'ao' # everything dynamic x = 'aoeu' assert x[i:j] == 'ao' x = [2, 4, 6] assert x[i:j] == [2, 4]