Strings - CBSE Class 11 Computer Science Notes, Diagrams and Solved Questions
Work with text in Python: indexing from both ends, slicing with steps, joining and repeating, membership, traversal with loops, and the built-in string methods, with palindrome and counting programs.
In this chapter
Creating strings, indexing from the left and right, and immutability
Slicing with start, stop and step, including reversing
Concatenation, repetition and the in / not in operators
Traversing a string with for and while loops
Case and test methods: upper, lower, title, capitalize, isalpha, isdigit and more
Searching and replacing: count, find, index, startswith, endswith, replace
Cleaning and splitting text: strip, split, partition and join
Classic programs: vowel counts, palindromes and case conversion