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

ord()

Devolve o valor numérico de um caráter de str ou de um byte em bytes ou bytearray.

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

pow()

Eleva a base a uma potência, opcionalmente módulo mod.

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

property()

A leitura de box.area chama a função de leitura com a instância self e dá 3 · 4 = 12.

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

repr()

Devolve um texto de inspeção por `__repr__`.

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

reversed()

Cria um iterador inverso por `__reversed__` ou pelo comprimento e índices da sequência.

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

round()

Arredonda um número para uma posição decimal escolhida.

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

set()

Cria um conjunto mutável de elementos que admitem hash.

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

setattr()

Atribui o atributo indicado pela cadeia e devolve None.

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

slice()

Guarda início, fim excluído e passo para um corte posterior.

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

sorted()

Devolve uma nova lista ordenada por comparações de menor que.

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

staticmethod()

Expõe uma função no espaço de nomes da classe sem acrescentar automaticamente self ou cls.

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

str: representação textual de um objeto

str cria uma cadeia Unicode. Converter um número em texto não executa cálculos; transformar bytes em texto exige uma escolha consciente da codificação.

Básico · Python 3.14
Python

sum()

Soma os elementos com start como parcela inicial.

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

super()

Cria um intermediário que procura após a classe atual na ordem de resolução de métodos do recetor.

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

tuple()

Cria um tuplo imutável e ordenado a partir de um iterável.

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

type()

Com um argumento devolve o tipo real do objeto.

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

vars()

Com argumento obtém o `__dict__` do objeto.

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

zip()

Agrupa os elementos correspondentes em tuplos durante a iteração.

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

Palavra-chave as

Liga um nome segundo a instrução.

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

Palavra-chave assert

Verifica uma invariante de diagnóstico quando `__debug__` é verdadeiro.

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

Palavra-chave async

Uma definição async def sem yield cria uma função de corrotina cuja chamada devolve uma corrotina sem executar o corpo.

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

Palavra-chave await

Numa corrotina ou num gerador assíncrono recebe o resultado ou a exceção de um objeto aguardável.

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