[Python] How to read user input until EOF?

Discussão em 'Python' iniciado por Stack, Setembro 2, 2025.

  1. Stack

    Stack Membro Participativo

    My current code reads user input until line-break. But I am trying to change that to a format where the user can write input until they press Ctrl+D to end their input.

    I currently do it like this:

    input = raw_input ("Input: ")


    But how can I change that to an EOF-ready version?

    Continue reading...

Compartilhe esta Página