The difference between ' \x00 ' and ' empty string ' of Python strings

Source: Internet
Author: User
Tags in python

Python has no character in this type. A string is either a direct amount or a scalar, which means that the Python interpreter does not contain other Python types. Strings are immutable types, which means that changing a string element requires creating a new string. C-language characters and strings the difference between Python's ' \x00 ' and ' empty string ' C-language characters and strings

Unlike Python, the C language has a base type character char and no string type.

The difference between ' a ' and ' a ' in the C language is that the character ' "(= ' \x00 ') is used as the ending sign in C's string, and ' it ' is a character with an ASCII code of 0, which does not cause any control action, nor is it a character that can be displayed.

The string ' A ' actually contains 2 characters: The difference between ' a ' and ' \x00 ' python ' and ' empty string '

Python does not support single character types, and one character is also used as a string in Python. The Python string is actually a fixed-length character array, so there is no end sign. Modifying a string is actually creating a new one.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.