[Python] What is the difference between starting a command with an ! and starting a command...

Discussão em 'Python' iniciado por Stack, Fevereiro 16, 2025.

  1. Stack

    Stack Membro Participativo

    If I open a Python 3 notebook in Google Colab and I run:

    !pwd
    !cd ..
    !pwd


    I get:

    /content
    /content


    Whereas running:

    !pwd
    %cd ..
    !pwd


    Results in:

    /content
    /
    /


    What's the difference between the execution of !some command and %some command?

    Continue reading...

Compartilhe esta Página