StudyToCert

All certifications / PCEP / Lessons

PCEP – Certified Entry-Level Python Programmer PCEP-30-02 · Domain 1: Computer programming and Python fundamentals

String operators (+ and *), assignment and compound assignment operators (+=, *=, etc.)

▶ Watch the overview video

Last reviewed September 30, 2026 · Leer en español

Two arithmetic symbols also work on strings, with different meanings. The + operator concatenates (joins) two strings: "snow" + "ball" gives "snowball". The * operator replicates a string a whole number of times: "ab" * 3 gives "ababab". The order of the operands for * does not matter, so 3 * "ab" is the same. Multiplying by zero or a negative number gives an empty string "". Neither operator adds a space for you: "Hello" + "world" is "Helloworld".

Free account

Keep reading for free

Create a free StudyToCert account to read the rest of this lesson: 7 more sections, 6 key terms, a real-world example, an exam tip and self-check questions. Every lesson, lab and practice test is free with an account.

Sign up free Log in

Study PCEP for free
A week-by-week plan with every lesson, quizzes, checkpoint tests, a practice exam and hands-on labs.
Open the PCEP study plan