Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
912 B
6
Indexable
#!/usr/bin/env python
# coding: utf-8

# In[3]:


marks=[]
n = int(input("enter the number"))
for i in range(n):
    value = int(input("enter elements"))
    marks.append(value)
print(marks)

newmarks = []
for x in marks:
    if x not in newmarks:
        newmarks.append(x)
print(newmarks)


# In[22]:


#example
music = []
n = int(input("enter the no of songs: "))
for i in range(n):
    songs = input("enter the song: ")
    if songs not in music:
        music.append(songs)
print(music)


# In[21]:


#slipno
list1 = []
n = int(input("enter no of element in list1: "))
for i in range(n):
    value = int(input("enter element:"))
    list1.append(value)
    
list2= []
n = int(input("enter no of element in list2:"))
for i in range(n):
    value = int(input("enter element : "))
    list2.append(value)
print("list1: ", list1)
print("list1: ", list2)
tuple1 = tuple(list1+list2)
print(tuple1)


# In[ ]: