Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

colon in array python

>>> a=[1,2,3,4,5]
>>> a[1:3]
[2, 3]
>>> a[:3]
[1, 2, 3]
>>> a[2:]
[3, 4, 5]
>>> s='computer'
>>> s[:3]
'com'
>>> s[3:6]
'put'
Source by www.tutorialspoint.com #
 
PREVIOUS NEXT
Tagged: #colon #array #python
ADD COMMENT
Topic
Name
8+7 =