Professional Documents
Culture Documents
Assignment 1
Assignment 1
What is a list in Python? Differentiate it with tuple. Explain slicing and striding with
2.
suitable example.
3. How can a map be used in a Python program? Explain with a suitable example.
Write a Python program to remove the first occurrence of a specified element from an
4.
array.
Write a Python program to search a specific value from a given list of values using binary
5.
search method.
Write a function that takes in a string and uses a list comprehension to return all the
6.
vowels in the string
Iterate a given list and Check if a given element already exists in a dictionary as a key’s
7.
value if not delete it from the list
nums=[1,2,5,10,3,100,9,24]
for i in nums:
8.
if i<5:
nums.remove(i)
nums