{
  "id": 21440459,
  "title": "Python: String",
  "url": "https://urgent.news/2026/11/23/python-string",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-23T18:12:51.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/mvarshith/python-string-2p24"
  },
  "original_language": "en",
  "account": "String is a datatype in Python, denoted as str. It comprises of various characters including alphabets, symbols and numbers. Strings are enclosed in single or double quotes, and for multiline text, triple quotes (either ''' or \"\"\") are used. They are indexed, starting from 0 and negative indexing runs from right to left, with -1 representing the last character. Strings are immutable, meaning they cannot be changed once created; any modification results in a new string. For example, trying to change a string's character by assigning a new value directly to an index would result in a TypeError. However, new strings can be created by concatenating the original string with a new string or by slicing the original string. The .format() method is used to format strings, allowing for the insertion of variables into string templates. Lists, on the other hand, are mutable and ordered collections written within square brackets []. They can hold mixed data types and duplicates, and their elements can be changed. Lists are also indexed like strings, but unlike strings, they allow modifications. Functions like len() and list() can be used with lists. len() returns the count of elements in a list, while list() converts various data types into lists. The range() function generates sequences of numbers, which can be used in for loops for iteration.",
  "summary": "Python Notes: Strings, Lists, Loops 1. What is a String? A string is a datatype, written as str in Python. It is a collection of characters: alphabets, special characters and numbers. It is written in single or double quotes. Use triple quotes ( ''' or \"\"\" ) for multiline text. It is index based. Indexing starts from 0. Negative indexing runs right to left: the last letter is -1 . Slicing syntax…",
  "key_points": [
    "String is a datatype in Python, denoted as str.",
    "Strings are enclosed in single or double quotes, triple quotes for multiline.",
    "Strings are immutable, cannot be changed once created."
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}