Informatics Practices
What is the use of append() function in list?
- It adds an item to the end of the list.
- It adds an item at the beginning of the list.
- It adds an item anywhere in the list.
- All of these
Related Questions
Which operator can be used with list?
- in
- not in
- Both 1 & 2
- Arithmetic Operators only
Which of the following commands will create a list?
- List1=list ()
- List1= []
- List1=[1,2,3,"a"]
- All of these
Select the output of the following expression:
str1 = "pen" print(list(str1))- ['p', 'e', 'n' ]
- [pen]
- [p/e/n]
- { "pen" }
The sequential accessing of each of the elements in a list is called:
- List Indexing
- List Traversal
- List Slicing
- List Accessing