0% found this document useful (0 votes)
24 views

Begginer List Problem

The document contains 10 questions about performing various operations on Python lists such as reversing a list, removing empty strings from a list, squaring numbers in a list, reversing a list using slicing, adding an item to a nested list, removing all occurrences of an item from a list, declaring and displaying a list with different data types, summing and averaging items in a list, converting a list of characters to a string, and finding the sum and average of odd items in a list.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

Begginer List Problem

The document contains 10 questions about performing various operations on Python lists such as reversing a list, removing empty strings from a list, squaring numbers in a list, reversing a list using slicing, adding an item to a nested list, removing all occurrences of an item from a list, declaring and displaying a list with different data types, summing and averaging items in a list, converting a list of characters to a string, and finding the sum and average of odd items in a list.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Beginner

Q1. Write a programme to reverse the given list.


list1 = [100, 200, 300, 400, 500]

Q2. Write a programme to remove empty strings from the list of strings.

List1=[“python”, “ ”, “java”, “ ”, “c++”, “ ”, “Php”]

Q5. Given a list of numbers. write a program to turn every item of a list into its square.

numbers = [1, 2, 3, 4, 5, 6, 7]

Q4. . Write a programme to reverse the given list using slicing method.
list1 = [100, 200, 300, 400, 500]

Q5. Write a program to add item 7000 after 6000 in the following Python List.

list1 = [10, 20, [300, 400, [5000, 6000], 500], 30, 40]

Expected output:

[10, 20, [300, 400, [5000, 6000, 7000], 500], 30, 40]

Q 6 . Given a Python list, write a program to remove all occurrences of item 20.

list1 = [5, 20, 15, 20, 25, 50, 20]

Q7. Declare one list by using one integer , one float and two strings. After adding display 2nd
element and check the data type of the list.

Q8. Write a Python program to sum all the items in a list. And Average
List1=[1,2,3,4,5,6,7,8,9,10,12,,14]
Beginner

Q9. Write a Python program to convert a list of characters into a string.

Listq=[“b”,”o”,”f”,”f”,”I”,”n’’,”s”]

Q10.Write a Python program to find sum all the odd items in a list. And Average of the same.
List1=[1,2,3,4,5,6,7,8,9,10,12,,14]

You might also like