Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 3 out of 20 pages
Exam (elaborations)

Python for IT Automation D522 Quick Study Sheet: Key Concepts & Tips

Document preview thumbnail
Preview 3 out of 20 pages

Python for IT Automation D522 Quick Study Sheet: Key Concepts & Tips

Content preview

Python for IT Automation D522 Quick Study Sheet: Key Concepts & Tips




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




Python for IT Automation D522 Quick Study Sheet: Key Concepts & Tips

,Python for IT Automation D522 Quick Study Sheet: Key Concepts & Tips




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]




2
Downloaded by Morris mwangi Ngigi ()

, Python for IT Automation D522 Quick Study Sheet: Key Concepts & Tips




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




3
Downloaded by Morris mwangi Ngigi ()

Document information

Uploaded on
August 30, 2026
Number of pages
20
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$15.49

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Stuviatlas
3.8
(436)
Sold
1860
Followers
1470
Items
7333
Last sold
12 hours ago




Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions