Italiano
Apri in Telegram

Conversazione این در واقع یک مثاله من میخوام استثناعات رو مدیریت کنم

7 messaggi · –
A
این در واقع یک مثاله من میخوام استثناعات رو مدیریت کنم میخوام اگه اروری قراره چاپ بشه من متن خودمو جایگزین کنم کسی ایده ای نداره؟
      1. M
        try: num1 = 7 num2 = 0 print (num1 / num2) print("Done calculation") except ZeroDivisionError: print("An error occurred") print("due to zero division") ی چیز شبیه این
      2. M
        try: print("Hello") print(1 / 0) except ZeroDivisionError: print("Divided by zero") finally: print("This code will run no matter what") و شبیه این
  1. S
    ساختار مدیریت اکسپشن ها: try: Code except ValueError as e: Your msg here except Exception as e: Your msg here ...
PPython + Linux ExpertsPython + Linux Experts@PythonLinuxExperts · gruppo · Tecnologia
4 287membri20scrivono in 30 giorni
Feed della community Apri in Telegram

Un feed pubblico aperto dall'indice di ricerca ChatCrawler — «Google per il Telegram pubblico»; si aggiorna man mano che la community viene scansionata. Orari in UTC.

Solo contenuti pubblici, API ufficiale di Telegram. Informazioni · FAQ · Limiti dell'indice · Rimuovi una pagina · Catalogo · Ricerca · Come calcoliamo