Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

for loop only for first 10 python

>>> l = [1, 2, 3, 4, 5]
>>> n = 3
>>> l[:n]
[1, 2, 3]
 
PREVIOUS NEXT
Tagged: #loop #python
ADD COMMENT
Topic
Name
7+8 =