
上QQ阅读APP看书,第一时间看更新
String types
We know that a string is a collection of characters. In Python, string types come under the sequence category. Strings are really powerful and have many methods that can be used to perform string manipulation operations. Let's look at the following piece of code, which introduces us to strings in Python. Strings can be declared within both single and double quotes in Python:

In the preceding code, we are simply declaring a string called my_str and printing it on the console window.