Feb. 17, 2024, 1:29 a.m. | Paulo GP

DEV Community dev.to

Python has powerful built-in support for working with strings. In this post, we'll explore some of the most commonly used string operations, including creating strings, concatenating and repeating strings, changing the case of strings, replacing characters, splitting strings, checking for the existence of words, and formatting strings, all while applying an astronomy theme.





Creating Strings


In Python, you can create strings using single quotes, double quotes, or triple quotes. Here's an example of creating a one-line string and a multi-line …

astronomy beginners case characters explore operations programming python string strings support words

Lead Developer (AI)

@ Cere Network | San Francisco, US

Research Engineer

@ Allora Labs | Remote

Ecosystem Manager

@ Allora Labs | Remote

Founding AI Engineer, Agents

@ Occam AI | New York

AI Engineer Intern, Agents

@ Occam AI | US

AI Research Scientist

@ Vara | Berlin, Germany and Remote