Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions main6(revision).py
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,29 @@
# list1 = [[1,2,3],[4,5,6],[7,8,9]]
# for sublist in list1:
# for i in sublist:
# print(i)
# print(i)
# print(type(list1))

# list2 = [
# [1,2,3,],[5,6,7],[8,9,0]
# ]
# list2.insert([1],[1],4)
# print(list2)

"""

list3 = [1,2,3,4,5,7,8]
list3.clear()
print(list3)
print("""

# Dictionary
# A dictionary is a collection which is unordered, changeble and indexed. In python dictionaries are written within curly brackets, and they have keys and values. Means the dictionary contains two things first is the key and second is value.
"""
dict1 = {'Kiran': "Rai", 'Dipika': "Tamang",}
for x in dict1.values():
print(x)
"""
# change value of dictionary

dict1 = {'Kiran': "Rai", 'Dipika': "Tamang",}
dict1['Dipika'] = 'Rai'
print(dict1)