Escrito por estudiantes que aprobaron Inmediatamente disponible después del pago Leer en línea o como PDF ¿Documento equivocado? Cámbialo gratis 4,6 TrustPilot
logo-home
Document preview thumbnail
Vista previa 3 fuera de 20 páginas
Otro

WGU D522 Python for IT Automation Quick Study Sheet | Latest (2026/2027) Updated Version {JUST RLRASED} - Western Governors University

Document preview thumbnail
Vista previa 3 fuera de 20 páginas

WGU D522 Python for IT Automation Quick Study Sheet | Latest (2026/2027) Updated Version {JUST RLRASED} - Western Governors University

Vista previa del contenido

Python for IT Automation Quick Study Sheet
Common Python topics, examples, and study tips for quick review


This guide focuses on common Python topics students often see in Python for IT Automation, with
simple examples and study tips.



1. Variables and Data Types
name = "Joy" # string
age = 25 # integer
price = 19.99 # float
is_ready = True # Boolean




Common types

Item Description

str text

int whole numbers

float decimal numbers

bool True or False

list ordered, changeable collection (mutable)

tuple ordered, unchangeable collection (immutable)

dict key-value pairs

set unordered, unique values



2. Type Checking and Conversion
x = "5"
print(type(x)) # <class 'str'> This checks the type of data

num = int(x) int(x) converts the string into an interger and then add 2 to it
print(num + 2) # 7 giving you the output of 7




1

,Common conversions

Item Description

int("10") takes a string and converts it to an integer

float("3.14") takes a string and converts it to a float

str(25) takes an integer and converts it to a string

True # 0 is False and any non-zero numbers is
bool(1)
True

Takes a string (“abc”) and converts it to a list of
list("abc")
individual characters ['a', 'b', 'c']



3. Lists
fruits = ["apple", "banana", "orange"]
print(fruits[0]) # apple fruits[0] gets the first item
print(len(fruits)) # 3 this will output the number of items in the list

fruits.append("grape") append('grape') adds 'grape' to the end of the list
fruits.remove("banana") remove('banana') deletes 'banana' from the list




Useful list methods
fruits = ["apple", "banana"]


fruits.append("orange") # add one item to the end
print(fruits) # ['apple', 'banana', 'orange']


fruits.remove("banana") # remove by value
print(fruits) # ['apple', 'orange']


fruits.insert(1, "grape") # insert at a specific index
print(fruits) # ['apple', 'grape', 'orange']


print(fruits.pop()) # removes and returns last item
print(fruits) # ['apple', 'grape']


numbers = [4, 2, 7, 1]


numbers.sort() # sorts the list in ascending order
print(numbers) # [1, 2, 4, 7]

, numbers.reverse() # reverses the current order of the list
print(numbers) # [7, 4, 2, 1]




List method reminders

Item Description

.append(x) adds one item to the end of the list

.remove(x) removes the first matching value

.insert(i, x) inserts item at a specific position

.pop() removes and returns an item

.sort() puts items in order and changes the original list

flips the current order and changes the original
.reverse()
list



Create a new list

This example creates a new list with only even numbers
numbers = [1, 2, 3, 4, 5, 6]


even_numbers = [] creates an empty list

for num in numbers:
if num % 2 == 0: the % symbol means remainder (if the number divides by 2
even_numbers.append(num) with no remainder it is even)


print(even_numbers) # [2, 4, 6] add this item to the end of the list




Accessing an element from a list
fruits = ["apple", "banana", "orange"]


print(fruits[0]) # apple
print(fruits[1]) # banana
print(fruits[2]) # orange

Información del documento

Subido en
18 de septiembre de 2026
Número de páginas
20
Escrito en
2026/2027
Tipo
Otro
Personaje
Desconocido
$17.99

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Vendido
3
Seguidores
0
Artículos
459
Última venta
3 semanas hace



Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes