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

# + [markdown] id="view-in-github" colab_type="text"
# <a href="https://colab.research.google.com/github/EarraSahithi/python-letsupgrade/blob/master/assignment%201.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>

# + [markdown] id="CccWWY4M8xGG" colab_type="text"
# #list

# + id="pttFtjuh6-DB" colab_type="code" colab={"base_uri": "https://localhost:8080/", "height": 34} outputId="c63524a8-4bc0-4746-881b-36e52daa6326"
lst=[1,2,3,"hi","bye"]
lst

# + id="odgBmSFo8eJQ" colab_type="code" colab={"base_uri": "https://localhost:8080/", "height": 34} outputId="925aa591-84e1-4dfb-c902-7f439afef6d7"
lst.count(1)


# + id="CouKNFNW8OyQ" colab_type="code" colab={"base_uri": "https://localhost:8080/", "height": 34} outputId="d5fea650-eb0d-4fe1-a7d0-fcf5610b3fb8"
lst.append("hello")
lst

# + id="2Yow_RXg93QM" colab_type="code" colab={"base_uri": "https://localhost:8080/", "height": 34} outputId="1bd34c95-3cd4-4e3d-bae5-362b2d739e7f"
lst.reverse()
lst

# + id="q0vwE7gM992L" colab_type="code" colab={"base_uri": "https://localhost:8080/", "height": 34} outputId="9ef96c65-0d62-43c9-b042-84c2b2bc85ae"
lst.insert(0,"holla")
lst

# + id="VdTkQI56-Ji1" colab_type="code" colab={"base_uri": "https://localhost:8080/", "height": 34} outputId="b21928aa-60c2-4b4f-d4ef-0ca88b37d3a5"
lst.pop()

# + [markdown] id="gXBHMUlR-ids" colab_type="text"
# #Dictionary

# + id="BRt0n1Ye-pfR" colab_type="code" colab={"base_uri": "https://localhost:8080/", "height": 34} outputId="f2c42730-333a-4cf1-bee7-9301ff2b3307"
dit={"name":"sahi","age":20,"school":"niray"}
dit

# + id="4uOrmBZk-8H3" colab_type="code" colab={"base_uri": "https://localhost:8080/", "height": 34} outputId="44d1b487-6190-4772-8b2e-ebed11b629d4"
dit.pop("school")
dit

# + id="Rm53BlxA_SIW" colab_type="code" colab={"base_uri": "https://localhost:8080/", "height": 34} outputId="99c4ee38-0e27-41f9-b0ff-5e2765f2e523"
len(dit)

# + id="kT3WCnhJ_Vlg" colab_type="code" colab={"base_uri": "https://localhost:8080/", "height": 34} outputId="909c7e11-100c-4a75-a4d1-49be8558acbb"
dit['age']

# + id="5AfhLcUp_aeB" colab_type="code" colab={"base_uri": "https://localhost:8080/", "height": 35} outputId="2a8eb015-063e-4a45-e0db-3fc185f5fc54"
dit["name"]

# + id="p0ujHafE_023" colab_type="code" colab={"base_uri": "https://localhost:8080/", "height": 34} outputId="7872a81c-f708-490a-c84c-ad1b1fc0b18f"
dit.clear()
dit

# + [markdown] id="DglK_8r3AAFV" colab_type="text"
# #strings

# + id="GBtuvr8gADDe" colab_type="code" colab={"base_uri": "https://localhost:8080/", "height": 34} outputId="4c8b28a4-d970-4b26-9093-616c0dba4e66"
str=("smile","good")
str

# + id="ulwjJ9ygAWJo" colab_type="code" colab={"base_uri": "https://localhost:8080/", "height": 34} outputId="9cd98171-a30f-419c-cd59-1223552c4bb3"
str.index("good")

# + id="UP9a1sKvAv6G" colab_type="code" colab={"base_uri": "https://localhost:8080/", "height": 34} outputId="be524a0d-64de-4718-f557-799f3a713bde"
print(str[1])

# + id="JANwOv0qA9Ti" colab_type="code" colab={"base_uri": "https://localhost:8080/", "height": 34} outputId="331379c2-1ca9-4cff-a25c-99562ffb76ee"
len(str)

# + id="BY8tX9U0DYCi" colab_type="code" colab={"base_uri": "https://localhost:8080/", "height": 35} outputId="29739c04-be0b-45bc-99eb-2ba9aadb1d3c"
str[0]

# + [markdown] id="cEp65Y44Dg_t" colab_type="text"
# #tuple

# + id="25eoZo7vDkOB" colab_type="code" colab={"base_uri": "https://localhost:8080/", "height": 34} outputId="028b32be-c679-4657-c7d0-901af4f5430f"
tup=(1,2,3,"hi","hello")
tup

# + id="J9oG3KPgDtb2" colab_type="code" colab={"base_uri": "https://localhost:8080/", "height": 34} outputId="55d14baa-1c26-4152-c486-4017038a1df1"
tup.index(3)

# + id="nm6auoJPD-gO" colab_type="code" colab={"base_uri": "https://localhost:8080/", "height": 34} outputId="ac646418-d67c-4574-eb57-3463c2124ba7"
len(tup)

# + id="99-s7sRfEX4F" colab_type="code" colab={"base_uri": "https://localhost:8080/", "height": 34} outputId="05beaf54-f482-4960-81b3-20412a2ed95d"
tup[0]

# + id="JGjvjUcREipZ" colab_type="code" colab={"base_uri": "https://localhost:8080/", "height": 34} outputId="e0ee36b5-ed39-44cc-8117-f0371afbf39f"
tup[0:3]

# + id="If1kY6TlFHOw" colab_type="code" colab={"base_uri": "https://localhost:8080/", "height": 34} outputId="35066a1a-856e-4ad6-da04-0258d108cb34"
tup[1:3]

# + [markdown] id="WUzvYjW9FUdP" colab_type="text"
# #sets

# + id="flHfk9DnFWBm" colab_type="code" colab={"base_uri": "https://localhost:8080/", "height": 34} outputId="75bfa73c-7684-436c-8a32-68f7e09f260e"
set={"apple","banana","grapes","orange"}
set

# + id="0hTaNpw6FnfY" colab_type="code" colab={"base_uri": "https://localhost:8080/", "height": 35} outputId="e04b184b-169b-4a37-dd32-75966f10da0c"
set.pop()

# + id="WkkAscD7HpR9" colab_type="code" colab={}
set.discard("banana")

# + id="2b2mRRo-Hts7" colab_type="code" colab={"base_uri": "https://localhost:8080/", "height": 34} outputId="4a441f46-fa99-4458-fae8-1c60002cd3a9"
set

# + id="z6R0yo3cHypz" colab_type="code" colab={}
set.remove("orange")

# + id="VQ7pAS8rH6c9" colab_type="code" colab={"base_uri": "https://localhost:8080/", "height": 34} outputId="3eccf2c6-ef66-4711-d9df-ff16621dee63"
set

# + id="QaDIYDCYITuk" colab_type="code" colab={}
set.add("berry")

# + id="HoOkuANeIipO" colab_type="code" colab={"base_uri": "https://localhost:8080/", "height": 34} outputId="a922896d-12ed-4470-9cbd-aee685e4bb1b"
set

# + id="4QJw2BM-Itjc" colab_type="code" colab={}
set.clear()

# + id="DpDg40jJIwWy" colab_type="code" colab={"base_uri": "https://localhost:8080/", "height": 34} outputId="8b0b6469-f859-4b5d-dab1-75274fa2ed48"
set

StarcoderdataJupyterScriptsDedupFiltered