CertGrid CertGrid
Concepts·Certified Associate Python Programmer

PCAP String Methods

PCAP objective 3.3 is employ built-in string methods, and unusually it names them: capitalize, center, count, endswith, find, index, isalnum, isalpha, isdigit, islower, isspace, isupper, join, lower, lstrip, replace, rfind, rstrip, split, startswith, strip, swapcase, title, upper. This page runs every one, then the optional arguments most of them take - because that is where the answers change.

Strings in Depth Guide 11 of 25 Intermediate

Written against the versions above. None of these methods has changed in Python 3. `str` has 47 public methods in total; the objective names 24 of them, and the extras worth knowing are at the end of this page.

One machine, and any shell with Python 3 will do - these exams test the language, not a distribution.
Server NameIP AddressOSRolesCPURAMHDD
RUNNER01192.168.0.27Ubuntu 26.04 LTSPython 3.14.4 - the only machine this path needs2 Core4 GB50 GB

Before you start

  1. The named list, run in one go

  2. The optional arguments that change every answer

  3. find against index

  4. The is-family on an empty string

  5. capitalize, title and swapcase on awkward input

  6. Every method returns a new string

  7. Three more that are useful and are not on the list

  8. What the exam does with this objective

Official sources