Skip to Main Content
USE A CABEÇA! PROGRAMAÇÃO
book

USE A CABEÇA! PROGRAMAÇÃO

by David Griffiths, Paul Barry
January 2009
Beginner to intermediate content levelBeginner to intermediate
440 pages
13h 6m
Portuguese (Portugal, Brazil)
Alta Books
Content preview from USE A CABEÇA! PROGRAMAÇÃO
GUI’s e dados
você está aqui 287
adicionando opções
Primeiro, você precisa criar uma função chamada read_depots(), que lerá as linhas em um
arquivo de texto e irá retorná-las ao seu código como uma lista.
Sugestão: Quando você lê uma linha no arquivo, ela pode ter um caractere de nova linha no nal.
O método de string rstrip() irá removê-lo para você.
def read_depots(le):
E depois, você precisará substituir esta seção do código pelo código que gera um menu de
opções usando os dados a partir da função read_depots() que você acabou de criar. E
deverá usar um arquivo chamado depots.txt. Escreva o código aqui:
Esta função será
inserida aqui.
1
2
UC Programming ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

USE A CABEÇA! ÁLGEBRA

USE A CABEÇA! ÁLGEBRA

Tracey Pilon, Dan Pilon
Use A Cabeça Ágil

Use A Cabeça Ágil

Jennifer Stellman, Andrew Greene
Use A Cabeça Padrões E Projetos

Use A Cabeça Padrões E Projetos

Eric Freeman, Elisabeth Freeman, Kathy Sierra, Bert Bates

Publisher Resources

ISBN: 9788576084730