O GoConqr está de visual novo! Conte para nós o que você achou.

Notas

Sem título

Manogna Oruganti Python Inglês 1 página

Conteúdo das notas (1)

Página 1

Type conversion

type(varible) gives the type name

you cannot simply sum strings and floats,/int/etc in print statement. Hence convert them into string by using function str.

Similar functions such as int(), float() and bool() will help you convert Python values into any type.

lists, list of lists, subsetting lists, indexing list from back

[ : ] includeive:exclusive

Removing elements from the list is done by using function del()

Ex: del(x[1])

When you copy list to other variable, you copy the reference.

ADD

# Create list areas

areas = [11.25, 18.0, 20.0, 10.75, 9.50]

# Create areas_copy

areas_copy = list(areas)

#or areas_copy = areas[:]

# Change areas_copy

areas_copy[0] = 5.0

# Print areas

print(areas)

fam = ["mom","dad]

Functions => fun()

type(fam)

> list

Methods:: call functions on object

ex:

fam.index("dad")

> 1

In python, everything is an object and it has methods depending on type

Informações

Descrição
Python Notas sobre Sem título, criado por Manogna Oruganti em 27-02-2019.
Criado por
Manogna Oruganti · fev 2019
Atualizado
27 fev 2019
Visualizações
1
Avaliação

Fale Conosco

Sobre o que é sua mensagem?

O que você acha do novo visual?

Você gostou?