Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

slicing in python listing

list_example = ["python","ruby","java","javascript","c#","css","html"]
print(list_example[3])#javascript
print(list_example[0])#python
print(list_example[6])#html
print(list_example[0:3]) #will print the programming language under python and javascript
print(list_example[:3]) all languages under python to javascript
 
PREVIOUS NEXT
Tagged: #slicing #python #listing
ADD COMMENT
Topic
Name
5+1 =