# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# # List and its functions

list = ["Manoj","Kumar",1002,"EIE","NECN"]

list

# +
# Adds an item

list.append("HI")
# -

list

# +
# Extends the list by appending all the items

list.extend(["BRUCE","BANNER"])
# -

list

# +
# Inserts an item at a given position.

list.insert(0,"I'm")
# -

list

# +
# Removes the first item from the list 

list.remove("BANNER")
# -

list

# +
# Returns the number of items in the list.

len(list)

# +
# Removes all items from the list

list.clear()
# -

list

# +
# New list

mylist = ["falcon","bucky",786,"rogers"]
# -

mylist

# +
# New updated list

mylist = ["bee", "moth", "ant"]

# +
# Returns the largest item in an list

print(max(mylist))
# -

list1 = ["ant", "moth", "wasp"]

# +
# Returns the smallest item in an list

print(min(list1))
# -

# # The End



StarcoderdataJupyterScriptsDedupFiltered