# ---
# 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

lst = ["Hello","coding",2.8,75]

lst

lst.append(45)

lst

lst.index("coding")

lst.extend("mahee")

lst

lst.remove(2.8)

lst

lst.pop()

lst.reverse()

lst

lst.copy()

lst.count("hello")

lst.clear()

lst

# # DICTIONARY

dit = {"name":"mahesh","age":"20","profession":"student"}

dit

dit.get("name")

dit.keys()

dit.pop("name")

dit.setdefault("age")

dit.popitem()

dit

dit.copy()

dit.update({"name":"mahesh"})
dit

dit

dit.items()

dit.clear()

dit

# # SETS

st = {'a','b','c','d','e','a','b'}

st

st.add("f")

st

st.discard("f")

st

st1 = {'a','b','c'}

st1

st1.issubset(st)

st.intersection(st1)

st.copy()

st.difference(st1)

st.difference_update(st1)

st

st.add('c')

st

st.intersection_update(st1)

st

st.clear()

st

# # PYTHON

tup = (1,5,7,8,9,3,5,6,7,8,9)

tup

tup.count(7)

tup.index(9)

# # STRING

str1 = "hello world coding programming"

str1

str1.capitalize()

str1.casefold()

str1.center(50)

str1.encode()

str1.endswith('')

str1.endswith('.')

str1.expandtabs(2)

str1.find("p")

str1.format({})

str1.format_map



StarcoderdataJupyterScriptsDedupFiltered