错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Strings

  • A. Lakshmi Muddana,
  • Sandhya Vinayakam

摘要

Characters are the symbols used in writing the code. As computers can only store and process binary data, these characters are converted into a binary form called encoding. Binary data is again converted back to character form to present it to the user, called decoding. ASCII and Unicode are the popular encoding methods. A string is a sequence of characters enclosed in single or double quotes. It is a sequence data type where individual characters can be accessed using its index. Python does not support character data type. A single character in quotes is also treated as a string of length one. A StringImmutablestring object is immutable, i.e., once created, it cannot be modified. However, it can be assigned to another string variable.