Lesson 8: Strings | Python Beginner Course 2025 🐍

 


    In this lesson, we'll learn about strings in Python. In Python, a string is a fundamental data type used to represent sequences of characters. These characters can include letters, numbers, symbols, and whitespace. Strings are essential for handling and manipulating text in programming. Below are examples of using strings in Python.

Creating & Printing Strings:

         x="Hello"

  print(x)

Adding Strings Together  

      x="Hello"

     y="World"

  print(x + y)
Indexing Strings
        
      x="Hello"
     print(x[1])

Slicing Strings    

      x="Hello"
     print(x[0:3])