Answers for "define slicing in python list"

1

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
Posted by: Guest on December-23-2021

Python Answers by Framework

Browse Popular Code Answers by Language