Source

pynie / Lib / test / bootstrap / lists.py

Full commit
#!./parrot


print('test: one element list')
a = ["parrot"]
if a: print('success: one element list')
else: print('failure: one element list')

print('test: two element list')
b = ["success: two element list", ["success: subelement"]]
print(b[0])
print('test: subelement')
print(b[1][0])

print('test: single item in parens')
c = ("success: single item in parens")
print(c)

print('test: single item with comma')
d = ("success: single item with comma",)
print(d[0])

print('test: delete list')
del a
print('success: delete list')