-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpython tips.py
More file actions
42 lines (31 loc) · 756 Bytes
/
python tips.py
File metadata and controls
42 lines (31 loc) · 756 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
agregar un TAB a la linea.
\t
print("\tPython")
>>> Python
print("\tPython")
>>> Python
Agregar un ENTER a la linea
\n
\n\t
Tambien se pueden combinar
print("Languages:\n\tPython\n\tC\n\tJavaScript")
Languages:
Python
C
JavaScript
Eliminar espacios en blanco
variable.rstrip()
variable.rstrip()
listas = ['element_1','element_2','element_N']
Copiar una lista
lista_nueva = lista_original [:]
Atencion !!!
No es lo mismo
lista_nueva = lista_original
Creacion de una lista recorriendo un for.
cubes = [value **3 for value in range(1,12)]
print (cubes)
No se puede iterar varias veces un objeto csv_
Multiline String
prompt = "If you tell us who you are, we can personalize the messages you see."
prompt += "\nWhat is your first name? "