0Pricing
Learn AI with Python · Lesson

Strings as Data Structures

Explore Python strings and their powerful built-in methods.

1

Introduction to Strings as Data Structures

Strings in Python are sequences of characters. They can be treated as data structures because they support indexing, slicing, and various methods for manipulation.

In this lesson, you’ll learn how to work with strings and use their powerful methods.

Strings as Data Structures — illustration 1

2

Creating Strings

Strings are created by enclosing characters in single, double, or triple quotes:

# Creating a string
text = "Hello, World!"
print(text)

All lessons in this course

  1. Lists
  2. Tuples
  3. Sets
  4. Dictionaries
  5. Strings as Data Structures
← Back to Learn AI with Python