GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Karteikarten

Basic Python - Tuples and Files

Rebecca Noel Python Basics none Englisch 11 Karten

Karten in diesem Stapel (11)

  1. 1How is a tuple constructed?Tuples use () with elements separated by commas.
    t = (1,2,3)
  2. 2T/F?: Tuples can be created with mixed types of elements.True
  3. 3T/F?: The len() check does NOT work with tuples.False
  4. 4T/F?: Slicing works with tuples the same it does with lists.True
  5. 5What two methods are available for tuples?.count and .index
  6. 6What very important characteristic differentiates tuples from lists?IMMUTABLE
  7. 7What function is used to open a file (.txt)?open()
    ex:
    f = open('test.txt')
  8. 8Explain what these functions do with files: .read() .seek() .readlines()- reads the file
    - seek back to a different point in the file
    - reads lines of file without resetting
  9. 9If you are trying to read a large file which function is preferred; .read() or .readlines()?.read()
  10. 10What jupyter notebook exclusive way can we write a new file?%%writefile new.txt
    First line
    Second line
  11. 11—

Informationen

Beschreibung
none Python Basics (Object & Data Structure Basics) Karteikarten am Basic Python - Tuples and Files, erstellt von Rebecca Noel am 13/12/2016.
Erstellt von
Rebecca Noel
Aufrufe
14
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck