Base de conhecimentoCentro de Exames
PT · PTPortuguês (Portugal)
Escolher idioma13

CKTIS / Python

Base de conhecimento — Python

Sintaxe, operadores e conceitos de programação. Encontra uma explicação, consulta um exemplo e continua a aprender.

Entradas: 583

Python

itertools.starmap

Desempacota cada linha em argumentos posicionais da função durante a leitura.

Intermédio · Python 3.14; repository image, production runtime not attested
Python

itertools.takewhile

Emite os primeiros elementos enquanto o predicado for verdadeiro.

Intermédio · Python 3.14; repository image, production runtime not attested
Python

itertools.tee

Cria por predefinição dois iteradores com posições independentes sobre uma fonte.

Intermédio · Python 3.14; repository image, production runtime not attested
Python

itertools.zip_longest

Emparelha posições correspondentes até esgotar a entrada mais longa.

Intermédio · Python 3.14; repository image, production runtime not attested
Python

list.append

Acrescenta exatamente um objeto ao fim da lista existente.

Intermédio · Python 3.14; repository image, production runtime not attested
Python

list.clear

Remove todos os elementos da lista existente e devolve None.

Intermédio · Python 3.14; repository image, production runtime not attested
Python

list.copy

Cria uma cópia superficial, ou seja, uma lista nova com referências aos mesmos elementos.

Intermédio · Python 3.14; repository image, production runtime not attested
Python

list.count

Conta os elementos que são o mesmo objeto procurado ou que lhe são iguais.

Intermédio · Python 3.14; repository image, production runtime not attested
Python

list.extend

Acrescenta sucessivamente os elementos de um iterável à lista existente.

Intermédio · Python 3.14; repository image, production runtime not attested
Python

list.index

Devolve o índice a partir de zero do primeiro elemento igual; start e stop opcionais limitam a pesquisa excluindo stop.

Intermédio · Python 3.14; repository image, production runtime not attested
Python

list.insert

Insere antes da posição escolhida, ajustando índices extremos às posições de inserção disponíveis.

Intermédio · Python 3.14; repository image, production runtime not attested
Python

list.pop

Remove e devolve o elemento indexado.

Intermédio · Python 3.14; repository image, production runtime not attested
Python

list.remove

Remove o primeiro elemento que seja o mesmo objeto procurado ou que lhe seja igual.

Intermédio · Python 3.14; repository image, production runtime not attested
Python

list.reverse

Inverte as posições na lista existente sem comparar elementos.

Intermédio · Python 3.14; repository image, production runtime not attested
Python

list.sort

Ordena a lista no próprio objeto e devolve None.

Intermédio · Python 3.14; repository image, production runtime not attested
Python

logging.basicConfig

basicConfig define com level o limiar do registador raiz e configura o fluxo e o formato de saída.

Intermédio · Python 3.14; repository image, production runtime not attested
Python

logging.critical

critical comunica ao registador raiz um evento de nível CRITICAL com valor 50.

Intermédio · Python 3.14; repository image, production runtime not attested
Python

logging.debug

debug envia diagnósticos de nível DEBUG (10) ao registador raiz.

Intermédio · Python 3.14; repository image, production runtime not attested
Python

logging.error

error comunica ao registador raiz um evento de nível ERROR (40).

Intermédio · Python 3.14; repository image, production runtime not attested
Python

logging.exception

exception regista um evento ERROR com exc_info=True por omissão.

Intermédio · Python 3.14; repository image, production runtime not attested
Python

logging.Formatter

Formatter reúne atributos do registo como levelname e message num texto.

Intermédio · Python 3.14; repository image, production runtime not attested
Python

logging.getLogger

getLogger devolve o mesmo registador para o mesmo nome no intérprete e a raiz quando se omite o nome.

Intermédio · Python 3.14; repository image, production runtime not attested
Python

logging.info

info regista o progresso normal no nível INFO (20).

Intermédio · Python 3.14; repository image, production runtime not attested