PY
py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Created by Oma Falk
import numpy as np
# output 1
a = np.array([np.repeat(list('word'), 5)]).T
print(a, '\n')
# output 2
b = np.array([np.repeat('word', 5)]).T
print(b, '\n')
# output 3
m = np.array([list('word')]).T
c = np.array([np.repeat(arr, 5) for arr in m])
print(c, '\n')
# output 4
m = np.array([list('word')]).T
c = np.array([arr[0]*5 for arr in m])
print(c)
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run