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])

Lesson 7: Logical Operators | Python Beginner Course 2025 🐍

 


    In this lesson, we'll learn about logical operators in Python. Logical operators are used to combine conditional statements and control the flow of decision-making and output Boolean values. Below is a list of logical operators.


and - Returns true if both values are true.

or - Returns true if at least one value is true.

not - Returns true if the condition is false.


Here is an example


Input:

    x = 10

  print(x>5 and x<20)

Output:

    True