Base di conoscenzaCentro esami
ITItaliano
Scegli la lingua13

CKTIS / Python

Base di conoscenza — Python

Sintassi, operatori e concetti di programmazione. Trova una spiegazione, consulta un esempio e torna a imparare.

Voci: 583

Python

Modulo unittest

Organizza metodi di test in classi TestCase e li esegue in suite.

Intermedio · Python 3.14; repository image, production runtime not attested
Python

Operatore +

Somma due numeri o concatena sequenze compatibili, mantenendo l’ordine degli operandi.

Base · Python 3.14; repository image, production runtime not attested
Python

Operatore +=

Aggiorna la destinazione sinistra mediante addizione.

Base · Python 3.14; repository image, production runtime not attested
Python

Operatore =

Valuta prima il lato destro, poi lega il risultato a un nome o lo assegna alla destinazione.

Base · Python 3.14; repository image, production runtime not attested
Python

Operatore :=

Valuta una volta il lato destro, lega il risultato a un nome e restituisce lo stesso valore come espressione.

Base · Python 3.14; repository image, production runtime not attested
Python

Operatore &

Imposta un bit a uno soltanto se entrambi gli interi hanno uno in quella posizione.

Base · Python 3.14; repository image, production runtime not attested
Python

Operatore &=

Salva l’AND bit a bit tra valore precedente e maschera.

Base · Python 3.14; repository image, production runtime not attested
Python

Operatore ~

Inverte tutti i bit di un intero.

Base · Python 3.14; repository image, production runtime not attested
Python

Operatore |

Imposta un bit a uno se almeno uno dei due operandi ha uno in quella posizione.

Base · Python 3.14; repository image, production runtime not attested
Python

Operatore |=

Attiva nel numero i flag selezionati dagli uno della maschera e conserva gli altri bit.

Base · Python 3.14; repository image, production runtime not attested
Python

Operatore ^

Produce uno quando i bit differiscono e zero quando coincidono.

Base · Python 3.14; repository image, production runtime not attested
Python

Operatore ^=

Inverte nella destinazione soltanto i bit selezionati dagli uno della maschera.

Base · Python 3.14; repository image, production runtime not attested
Python

Operatore x if condition else y

La condizione al centro viene valutata per prima.

Base · Python 3.14; repository image, production runtime not attested
Python

Operatore /

Divide il numero a sinistra per quello a destra.

Base · Python 3.14; repository image, production runtime not attested
Python

Operatore /=

Divide il valore precedente per l’operando destro e salva il quoziente.

Base · Python 3.14; repository image, production runtime not attested
Python

Operatore ==

Confronta valori. Due liste distinte con elementi uguali nello stesso ordine sono uguali.

Base · Python 3.14; repository image, production runtime not attested
Python

Operatore **

Eleva la base sinistra all’esponente destro.

Base · Python 3.14; repository image, production runtime not attested
Python

Operatore **=

Eleva il valore precedente all’esponente destro e salva la potenza.

Base · Python 3.14; repository image, production runtime not attested
Python

Operatore //

Calcola il quoziente e lo arrotonda verso meno infinito.

Base · Python 3.14; repository image, production runtime not attested
Python

Operatore //=

Salva il quoziente arrotondato verso meno infinito, ad esempio per trasformare una posizione in un numero di intervallo.

Base · Python 3.14; repository image, production runtime not attested
Python

Operatore >=

Verifica se il valore a sinistra raggiunge o supera un limite inferiore.

Base · Python 3.14; repository image, production runtime not attested
Python

Operatore >

Verifica se l’operando sinistro è strettamente maggiore del destro; l’uguaglianza non basta.

Base · Python 3.14; repository image, production runtime not attested
Python

Operatore is

Verifica se i due riferimenti designano esattamente lo stesso oggetto.

Base · Python 3.14; repository image, production runtime not attested
Python

Operatore []

Un indice intero sceglie un elemento, uno negativo conta dalla fine.

Base · Python 3.14; repository image, production runtime not attested