GoConqr has a new look! Let us know what you think.

Flashcards

Python

Андрей Бармалей English 18 cards

Cards in this deck (18)

  1. 1extend()?
  2. 2dict()?
  3. 3def()?
  4. 4list()?
  5. 5lower()?
  6. 6hasattr(obj, '__call__')to detect if a variable is a function
  7. 7A tuple is immutableYes
  8. 8A list is mutable.Yes
  9. 9A tuple is mutableNo
  10. 10A list is immutable.No
  11. 11type(0,)tuple
  12. 12A tuple is an immutable data structure in Python. Can it hold mutable objects?Yes
  13. 13enumerate?
  14. 14If a list is mutable in Python, can it hold immutable objects?Yes
  15. 15for i in range 1The for loop is commonly used to repeat some code a certain number of times. This is done by combining for loops with range objects.
  16. 16insert()?
  17. 17list(range(3, 8))?
  18. 18Iterating through a list using a while loop requires quite a lot of code, so Python provides the for loop as a shortcut that accomplishes the same thing.words = ["hello", "world", "spam", "eggs"]
    for word in words:
    print(word + "!")

Information

Description
Flashcards on Python, created by Андрей Бармалей on 18/02/2019.
Views
0
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?