-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpacotes.py
More file actions
37 lines (21 loc) · 753 Bytes
/
Copy pathpacotes.py
File metadata and controls
37 lines (21 loc) · 753 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
"""
Pacotes
Módulo -> É apenas um arquivo Python que pode ter diversas funções para utilizarmos;
Pacote -> É um diretório contendo uma coleção de módulos;
OBS: Nas versões 2.x do Python, um pacote Python deveria conter dentro dele um
arquivo chamado __init__.py
Nas versões do Python 3.x, não é mais obrigatória a utilização deste arquivo, mas
normalmente ainda é utilizado para manter compatibilidade.
from geek import geek1, geek2
from geek.university import geek3, geek4
print(geek1.pi)
print(geek1.funcao1(4, 6))
print(geek2.curso)
print(geek2.funcao2())
print(geek3.funcao3())
print(geek4.funcao4())
"""
from geek.geek1 import funcao1
from geek.university.geek4 import funcao4
print(funcao1(6, 9))
print(funcao4())