STRINGS
Strings are one of the most important data types in Python. We use strings whenever we work with names, messages, filenames, database errors, log files, user input, and other text data. In this tutorial, we will learn Python strings from the absolute basics with simple examples. Table of Contents What is a String? Creating Strings Finding String Length with len() Python Functions vs String Methods upper() and lower() Removing Spaces with strip() Replacing Text with replace() String Immutability String Indexing Negative Indexing String Slicing Slicing Shortcuts Slicing with Step Reversing a String in and not in startswith() and endswith() split() join() find() count() F-Strings Common Beginner Mistakes Quick Revision Practice Questions 1. What is a String? A string is text stored in Python. Exampl...