Quiz
List in python
Perguntas do quiz (5)
1Which method is used to add an element to the end of a Python list?
- Ainsert()
- Bappend()
- Cextend()
- Dadd()
2What is the correct way to remove the first occurrence of a specific element from a list?
- Alist.delete(element)
- Blist.pop(element)
- Clist.remove(element)
- Dlist.discard(element)
3Which of the following is NOT a property of Python lists?
- AHas a fixed size
- BAllows duplicate elements
- CMutable
- DOrdered
4How can you add multiple elements to a list at once?
- Alist.append([element1, element2])
- Blist.extend([element1, element2])
- Clist.insert([element1, element2])
- Dlist.add([element1, element2])
5What is a key difference between an integer and a list in Python?
- AIntegers can be modified, lists cannot
- BLists can contain multiple values, integers cannot
- CIntegers are immutable, lists are mutable
- DLists are faster to process than integers
Informações
- Descrição
- CBSE Central Board of Secondary Education Computer Science Quiz sobre List in python, criado por Bessie Carl em 10-08-2024.
- Autor
- Bessie Carl
- Idioma
- English
- Visualizações
- 3
- Etiquetas
- Avaliação
- Ainda sem avaliações Avalie este quiz