nerdexam
Python_Institute

PCAP-31-03 · Question #68

Assuming that String is six or more letters long, the following slice String[1:-2] is shorter than the original string by:

The correct answer is B. three chars. See the full explanation below for the reasoning.

Question

Assuming that String is six or more letters long, the following slice String[1:-2] is shorter than the original string by:

Options

  • Afour chars
  • Bthree chars
  • Cone char
  • Dtwo chars

How the community answered

(31 responses)
  • A
    3% (1)
  • B
    77% (24)
  • C
    6% (2)
  • D
    13% (4)

Community Discussion

No community discussion yet for this question.

Full PCAP-31-03 Practice