Tipagem, strings e aspas
This commit is contained in:
22
aula3.py
Normal file
22
aula3.py
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
"""
|
||||||
|
DocString
|
||||||
|
Python = Linguagem de programação
|
||||||
|
Tipo de tipagem = Dinâmica / Forte
|
||||||
|
str -> string -> texto
|
||||||
|
Strings são textos que estão dentro de aspas
|
||||||
|
"""
|
||||||
|
print(1234)
|
||||||
|
|
||||||
|
# Aspas simples
|
||||||
|
print('Luiz Otávio')
|
||||||
|
print(1, 'Luiz "Otávio"')
|
||||||
|
|
||||||
|
# Aspas duplas
|
||||||
|
print("Luiz Otávio")
|
||||||
|
print(2, "Luiz 'Otávio'")
|
||||||
|
|
||||||
|
# Escape
|
||||||
|
print("Luiz \"Otávio\"")
|
||||||
|
|
||||||
|
# r
|
||||||
|
print(r"Luiz \"Otávio\"")
|
||||||
Reference in New Issue
Block a user