summaryrefslogtreecommitdiffstatshomepage
path: root/tests/basics/list_mult.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/basics/list_mult.py')
-rw-r--r--tests/basics/list_mult.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/basics/list_mult.py b/tests/basics/list_mult.py
index ec65fbb3f4..16948f74c2 100644
--- a/tests/basics/list_mult.py
+++ b/tests/basics/list_mult.py
@@ -1,4 +1,12 @@
+# basic multiplication
print([0] * 5)
+
+# check negative, 0, positive; lhs and rhs multiplication
+for i in (-4, -2, 0, 2, 4):
+ print(i * [1, 2])
+ print([1, 2] * i)
+
+# check that we don't modify existing list
a = [1, 2, 3]
c = a * 3
-print(c)
+print(a, c)