Selvi
asked

Expert
Sudip Bhandari answered
A string in Python is essentially a sequence of characters. It's used to represent text, and you can think of it as just another way of saying "text" in the programming world.
Whenever you want to work with text data, such as names, messages, or any kind of written content, you would use a string. Strings are enclosed in either single ('...'
) or double quotes ("..."
), and there is no functional difference between using one or the other:
# Examples of strings
name = "Ada" # Using double quotes
message = 'Hello!' # Using single quotes
You will learn more about strings in the upcoming chapters. For now, I suggest you continue the course.
Hope this helps!
Python
This question was asked as part of the Learn Python Basics course.