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

Python List Exercises

important python topics
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

Python List Exercises

important python topics
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Python List Exercises

 Python program to interchange first and last elements in a list


 Python program to swap two elements in a list
 Python | Ways to find length of list
 Maximum of two numbers in Python
 Minimum of two numbers in Python

Python String Exercises


 Python program to check whether the string is Symmetrical or Palindrome
 Reverse words in a given String in Python
 Ways to remove i’th character from string in Python
 Find length of a string in python (4 ways)
 Python program to print even length words in a string

Python Tuple Exercises


 Python program to Find the size of a Tuple
 Python – Maximum and Minimum K elements in Tuple
 Python – Sum of tuple elements
 Python – Row-wise element Addition in Tuple Matrix
 Create a list of tuples from given list having number and its cube in each
tuple

Python Dictionary Exercises


 Python | Sort Python Dictionaries by Key or Value
 Handling missing keys in Python dictionaries
 Python dictionary with keys having multiple inputs
 Python program to find the sum of all items in a dictionary
 Python program to find the size of a Dictionary

Python Set Exercises


 Find the size of a Set in Python
 Iterate over a set in Python
 Python – Maximum and Minimum in a Set
 Python – Remove items from Set
 Python – Check if two lists have atleast one element common
Python Matrix Exercises
 Python – Assigning Subsequent Rows to Matrix first row elements
 Adding and Subtracting Matrices in Python
 Python – Group similar elements into Matrix
 Python – Row-wise element Addition in Tuple Matrix
 Create an n x n square matrix, where all the sub-matrix have the sum of
opposite corner elements as even

Python Functions Exercises


 How to get list of parameters name from a function in Python?
 How to Print Multiple Arguments in Python?
 Python program to find the power of a number using recursion
 Sorting objects of user defined class in Python
 Functions that accept variable length key value pair as arguments

Python Lambda Exercises


 Lambda with if but without else in Python
 Python | Sorting string using order defined by another string
 Python | Find fibonacci series upto n using lambda
 Python program to count Even and Odd numbers in a List
 Python | Find the Number Occurring Odd Number of Times using Lambda
expression and reduce function

Python Pattern printing Exercises


 Program to print half Diamond star pattern
 Programs for printing pyramid patterns in Python
 Program to print the diamond shape
 Python | Print an Inverted Star Pattern
 Python Program to print digit pattern

Python DateTime Exercises


 Python program to get Current Time
 Get Yesterday’s date using Python
 Python program to print current year, month and day
 Python – Convert day number to date in particular year
 Get Current Time in different Timezone using Python

Python OOPS Exercises


 Python program to build flashcard using class in Python
 Shuffle a deck of card with OOPS in Python
 How to create an empty class in Python?
 Student management system in Python

Python LinkedList Exercises


 Python program to Search an Element in a Circular Linked List
 Pretty print Linked List in Python
 Python | Stack using Doubly Linked List
 Python | Queue using Doubly Linked List
 Python program to find middle of a linked list using one traversal

Python Searching Exercises


 Python Program for Linear Search
 Python Program for Binary Search (Recursive and Iterative)
 Python Program for Anagram Substring Search (Or Search for all
permutations)

Python Sorting Exercises


 Python Program for Bubble Sort
 Python Program for QuickSort
 Python Program for Insertion Sort
 Python Program for Selection Sort
 Python Program for Heap Sort

Python File Handling Exercises


 Read content from one file and write it into another file
 Write a dictionary to a file in Python
 How to check file size in Python?
 Find the most repeated word in a text file
 How to read specific lines from a File in Python?

Python Projects
 Number guessing game in Python
 2048 Game in Python
 Get Live Weather Desktop Notifications Using Python
 8-bit game using pygame
 Tic Tac Toe GUI In Python using PyGame

You might also like