-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathvariaveis.py
More file actions
51 lines (44 loc) · 814 Bytes
/
Copy pathvariaveis.py
File metadata and controls
51 lines (44 loc) · 814 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
37
38
39
40
41
42
43
44
45
46
47
48
49
"""
str = "textos"
int = 10
float = 10.5
boolean = true
# nomes para variavel
nome = "jose afranio volpato junior"
print(nome)
#mostrando o tipo
print(type(nome))
#função length (espaços tb conta)
print(len(nome))
#função Uper case
print(nome.upper())
#for x in nome:
# print(x)
print(nome[5::])
"""
#a = 10
#b = 3
#c = 5
#print(a)
#print(b)
#print(c)
"""
a,b,c = 10,3,5
print(type(a))
print(a,b,c)
a="jose"
print(type(a))
print(a,b,c)
a=100
print(type(a))
print(a,b,c)
"""
nomeCompleto = "Jose Afranio Volpato Junior"
print(nomeCompleto[0:10]) # primeiros dez caracteres
print(nomeCompleto[-1]) # ultimo caractere
print(nomeCompleto[3:10])
print(nomeCompleto[5::])
print(nomeCompleto[-6:-1])
print(nomeCompleto[-6::])
cpf= "0123456789ab"
print(cpf[0:3]+"."+cpf[3:6]+"."+cpf[6:9]+"-"+cpf[-2::])