Points to remember:
·
String is a data type in python.
·
Strings are immutable, that means once you define string, it cannot
be changed during execution.
·
Defining strings within triple quotes also allows creation of
multiline strings.
·
In a String, python allocate an index value for its each character
which is known as subscript.
·
The subscript can be positive or negative integer numbers.
·
Slice is a substring of a main string.
·
Stride is a third argument in slicing operation.
·
Escape sequences starts with a backslash and it can be interpreted
differently.
·
The format( ) function used with strings is very versatile and
powerful function used for formatting strings.
·
The ‘in’ and ‘not in’ operators can be used with strings to
determine whether a string is present in another string.
Related Topics
Privacy Policy, Terms and Conditions, DMCA Policy and Compliant
Copyright © 2018-2023 BrainKart.com; All Rights Reserved. Developed by Therithal info, Chennai.