replicate python code example
Example 1: replicate python
> rep(c("A","B"), times=2)
[1] "A" "B" "A" "B"
Example 2: replicate python
>>> ["A","B"]*2
['A', 'B', 'A', 'B']
Example 3: replicate python
a = ['1','2','3','4']
output = [a]*1000
> rep(c("A","B"), times=2)
[1] "A" "B" "A" "B"
>>> ["A","B"]*2
['A', 'B', 'A', 'B']
a = ['1','2','3','4']
output = [a]*1000