diff options
Diffstat (limited to 'tests/basics/string_mult.py')
-rw-r--r-- | tests/basics/string_mult.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/basics/string_mult.py b/tests/basics/string_mult.py new file mode 100644 index 0000000000..c0713c1d3a --- /dev/null +++ b/tests/basics/string_mult.py @@ -0,0 +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 * '12') + print('12' * i) + +# check that we don't modify existing object +a = '123' +c = a * 3 +print(a, c) |