str2d.Str2D.roll_v

Str2D.roll_v(x: int) Str2D[source]

Roll the data vertically.

Parameters:

x (int) – The number of positions to roll.

Return type:

Str2D

Examples

Let’s create an instance of Str2D and assign it to the variable a.

from str2d import Str2D

a = Str2D('a b c d\ne f g\nh i\nj')

We can roll the data vertically by passing the number of positions to roll.

a.roll_v(1)
j
a b c d
e f g
h i