DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
how to copy items in list n times in list python
In [16]: x1=[1,2,3,4] In [17]: np.repeat(x1,3) Out[17]: array([1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4])
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#copy
#items
#list
#times
#list
#python
ADD COMMENT
Topic
COMMENT
Name
5+6 =
Submit