This repository contains a Python-based assignment consisting of 35 coding problems, designed to reinforce core concepts of data structures using Python. The problems involve real-world data operations on strings, lists, sets, tuples, and dictionaries.
- ✅ String manipulation
- ✅ List operations and comprehensions
- ✅ Set theory operations (union, intersection, difference, symmetric difference)
- ✅ Tuple handling and slicing
- ✅ Dictionary operations (including nested structures)
- ✅ Custom implementations (reverse, sort, merge, count, shuffle)
- ✅ User input handling
- Python basics and advanced usage
- Data structure manipulation (strings, lists, sets, tuples, dictionaries)
- Writing custom logic without built-in shortcuts (e.g., reversing, sorting, shuffling)
- Problem decomposition and algorithmic thinking
- Pattern recognition
- Frequency analysis
- Decision making based on structure and content
# Count vowels in a string
def is_vowel(s):
return sum(1 for ch in s if ch.lower() in "aeiou")
# Reverse a list
my_list[::-1]
# Check for palindrome
s == s[::-1]
# Find union of sets
set1.union(set2)
- Clone the repository git clone https://github.com/Tanvikanaiya/data-structures-python-assignment.git
- Open the notebook file in Google Colab or Jupyter Notebook.
- Run each cell to test the outputs.