PYTHON PROJECT
Topic: String, List, Tuple and Dictionary
INTRODUCTION
Python is a high-level, interpreted, and easy-to-learn programming language. It is widely used in
software development, web development, data science, artificial intelligence, and automation.
Python is popular because of its simple syntax and readability.
Python provides various built-in data types. Among them, String, List, Tuple, and Dictionary are
commonly used data structures for storing and managing data efficiently.
STRING
A string is a sequence of characters enclosed within single, double, or triple quotes. Strings are
immutable and used to store text data.
LIST
A list is an ordered collection of elements enclosed within square brackets. Lists are mutable and
can store different types of data.
TUPLE
A tuple is similar to a list but is immutable. It is enclosed within parentheses and used to store fixed
data.
DICTIONARY
A dictionary stores data in key-value pairs enclosed within curly braces. It allows fast data access.
PYTHON PROGRAMS
1. Length of string
Input: Python
Output: 6
2. Uppercase and Lowercase
Output: PYTHON, python
3. Reverse string
Output: nohtyP
4. Count vowels
Output: 1
5. Palindrome check
Output: Palindrome
6. Sum of list elements
Output: 100
7. Largest number in list
Output: 89
8. Sorted list
Output: [1, 2, 5, 9]
9. Remove duplicates
Output: [1, 2, 3]
10. Even and Odd count
Output: Even=2 Odd=2
11. Display tuple
Output: (10, 20, 30)
12. Length of tuple
Output: 3
13. Max and Min in tuple
Output: Max=15 Min=3
14. Tuple to list
Output: [1, 2, 3]
15. Search element in tuple
Output: Element Found
16. Display dictionary
Output: {'Name':'Amit','Age':18}
17. Access dictionary value
Output: Amit
18. Add key-value pair
Output: {'Name':'Amit','Age':18,'Grade':'A'}
19. Delete dictionary key
Output: {'Name':'Amit'}
20. Character frequency
Output: {'a':2,'b':1}
CONCLUSION
String, List, Tuple, and Dictionary are essential Python data structures. They help in organizing and
managing data efficiently and are widely used in Python programming.
BIBLIOGRAPHY
Python Official Documentation
W3Schools Python Tutorial
GeeksforGeeks Python Programming
Class Notes and Teacher Guidance