[Python] What is a None value?

Discussão em 'Python' iniciado por Stack, Agosto 25, 2025.

  1. Stack

    Stack Membro Participativo

    I have been studying Python, and I read a chapter which describes the None value, but unfortunately this book isn't very clear at some points. I thought that I would find the answer to my question, if I share it there.

    I want to know what the None value is and what do you use it for?

    And also, I don't get this part of the book:


    Assigning a value of None to a variable is one way to reset it to its original, empty state.
    ​

    What does that mean?

    The answers were great, although I didn't understand most of answers due to my low knowledge of the computer world (I haven't learned about classes, objects, etc.). What does this sentence mean?


    Assigning a value of None to a variable is one way to reset it to its original, empty state.
    ​

    Final:

    Finally I've got my answer from looking to different answers. I must appreciate all the people who put their times to help me (especially Martijn Pieters and DSM), and I wish that I could choose all answers as the best, but the selection is limited to one. All of the answers were great.

    Continue reading...

Compartilhe esta Página