Test
List in python
Preguntas del test (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
Información
- Descripción
- CBSE Central Board of Secondary Education Computer Science Test sobre List in python, creado por Bessie Carl el 10/08/2024.
- Autor
- Bessie Carl
- Idioma
- English
- Visitas
- 3
- Etiquetas
- Valoración
- Aún sin valoraciones Valora este test