What is a string in Python?
06May, 2022
How Can We Help?
Created On
byMatt
Print
You are here:
< Back
Maker of websites,
Teacher,
Cat enthusiast
Teacher,
Cat enthusiast
Latest posts by Matt (see all)
- The 2022 End of Year Website Update - 01/01/2023
- Celebrating Ada Lovelace day - 10/10/2022
- Website update 5/9/22 - 05/09/2022
A string in python is a collection of letters and or numbers wrapped in speech marks that are addressed by python as simple text. An example of a string in python is:
print ("Hello World")
The string is “Hello World” because it is wrapped in speech marks.
Strings can also be assigned to variables like the example below:
x = "Hello World"
Matt
administrator
Maker of websites,
Teacher,
Cat enthusiast