[Python] What's the difference between raise, try, and assert?

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

  1. Stack

    Stack Membro Participativo

    I have been learning Python for a while and the raise function and assert are (what I realised is that both of them crash the app, unlike try - except) really similar and I can't see a situation where you would use raise or assert over try.

    So, what is the difference between raise, try, and assert?

    Continue reading...

Compartilhe esta Página