Home Coding Data Structure – Lists 05

Data Structure – Lists 05

0
Data Structure – Lists 05

# Lists methods and function 
# We will see some of the most used method and function for lists
# We will see: 
# sort(), append(), len(list), count(), insert(), pop(), 
# index(), remove(), reverse(), extend(), max(list),
# min(list), clear(), copy(), type(list)
#
# MAX - MIN

# I'm a list. Just a bunch of numbers
list1 = [36,1,254,5,98,641,8,52,-1,512,4]

# What is the bigger number in the list?
outMax  = max(list1)

# What is the smaller number in the list?
outMin = min(list1)

# copy www.AEC.codes
OUT = outMax, outMin