0% found this document useful (0 votes)
13 views1 page

Practical Python List and String Exercises

Djjdjdjs

Uploaded by

vaagmip
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)
13 views1 page

Practical Python List and String Exercises

Djjdjdjs

Uploaded by

vaagmip
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

LISTS PRACTICAL FILE QUESTIONS:

Q1. Write a program to display the following functions:

i. Sum
ii. Max
iii. Min
iv. Len
v. Eval
vi. Reverse
vii. Sort
viii. Pop
ix. Remove
x. Insert

Q2. Write a program to input a list and count the no. of occurrences of an element in it.

Q3. Write a program to input a list and remove all the occurrences of an element from it.

Q4. Write a program to add an element in front of a list.

Q5. Write a program to slice a list using positive and negative indexing.

Q6. Write a program to reverse a list using slicing.

Q7. Write a program to input a list and find out whether it is a palindrome or not.

Q8.

STRINGS:

Q1. Write a program to input a string and count the number of vowels.

Q2. Write a program to input a string and input a character and count the number of times it occurs
in the string.

Q3. Write a program to input a string and check whether it is a palindrome or not.

Q4. Write a program to input a list and print each character the number of times as it’s position
starting from 1.

You might also like