This page features a comprehensive list of python programs with examples and explanation for beginners as well as advanced learners.
Programs are categorized topic wise such as number programs, string programs, list programs and so on.
Programs on numbers
Below are the number programs in python.
- Swap two numbers in 5 ways.
- Convert Celsius to Fahrenheit.
- Check if number is even or odd.
- Check if a number is prime number.
- Check leap year.
- Find factorial of a number using for loop and recursion.
- Check for armstrong number.
- Convert kilometres to miles.
- Find square of number.
- Find square root of number.
Programs on strings
Find the list of string programs in python below
Programs on list
A collection of list programs in python is given below.
- Find sum of list elements.
- Find length or size of list.
- Looping or iterating over a list 4 ways.
- Find largest value in a list.
- Check if list contains a value.
- Sort a list in 2 ways
- Reverse a list in 4 ways.
- Clone a list in 6 ways.
- Remove an item from list.
- Remove first list element.
- Remove last list element.
- Write list to file.
- Convert list to set.
- Calculate standard deviation of list.
Programs on tuple
Following is a collection of tuple programs in python.
Following is a collection of array programs in python.