Ajude a dar forma ao GoConqr. O que a gente deve adicionar?

Flashcards

Basic Python - Lists

Rebecca Noel Python Basics none Inglês 1,0Avaliação média 1,0 de 5 (1 avaliação) 13 flashcards

Flashcards do conjunto (13)

  1. 1T/F?: A list is mutable, meaning the elements inside can be changed.True
  2. 2A list is constructed by...- assigning the list to a variable
    - construct the list between brackets []
    - and separate elements with commas
  3. 3What is the difference between the len() function with lists vs. strings?len() of list will tell you how many elements are in the list.
    len() of string will tell you how many characters are in string.
  4. 4T/F?: You can concatenate lists like with strings.True
  5. 5T/F?: When you concatenate a list that permanently changes the list.False. You have to reassign the list in order to add something permanently.
    my_list = my_list + ['new thing']
  6. 6What are two major reasons lists in Python are more flexible than arrays in other languages?1. the lists have no fixed size
    2. and no fixed type constraint
  7. 7What is the default indexed item in the pop() method? l.pop()-1
  8. 8Can you index something that doesn't have an item in the list?No, it will output an error
  9. 9What does nesting mean with Python lists?You can put data structures within data structures. (a list inside a list)
  10. 10T/F?: We use several sets of brackets to narrow down the item within the list within the list.True.
    matrix[0][0]
  11. 11What does Python's advanced feature called list comprehensions allow?It allows for quick construction of lists. Like grabbing just the first element of every list.
  12. 12Jupyter Notebook: When typing you can hit tab to...auto complete the word
  13. 13Jupyter Notebook: After typing in method you can shift + tab to ...see what the method does

Informações

Descrição
Lists concepts for basic Python 2
Criado por
Rebecca Noel
Visualizações
162
Tags
pythonlistscomputer programmingdata science
Avaliação
Avaliação média 1,0 de 5 (1 avaliação)

Fale Conosco

Sobre o que é sua mensagem?

O que a gente deve adicionar?