Python program to print duplicates in Python list | CBSE Class 11 & 12 Computer Science | in Hindi

preview_player
Показать описание
Python program to print duplicates in a Python list in Hindi

0:00 Intro
0:26 Problem description
2:00 Method 1 explanation - find duplicates in list using dictionary in Python
2:51 Method 1 - Python code to find duplicates in list using dictionary
5:10 Method 1 - Python code dry run
9:09 Method 2 explanation - Python code to find duplicates in list using sorting
11:03 Method 2 code - Python code find duplicates in list using sorting
14:18 Method 2 - Python code dry run
22:11 Testing the Python codes to find duplicates in list

Python program to print duplicates in a Python list of integers

The video approaches the solution in two different methods
- method 1 uses python dictionaries to find duplicates and prints the output in original order of appearance
- method 2 uses sorting to find duplicates and prints the output in sorted order

Example 1:
Input:
integers = [3, 6, 8, 6, 4, 5, 3]
Output:
3 6

Example 2:
Input:
integers = [3, 9, 8, 6, 4, 6, 5, 3, 9]
Output:
3 9 6

Python practice program for beginners.
Python practice program in loops.
Python practice program in functions.
Python practice program in sorting.

Python practice program for CBSE class 11 & class 12 computer science students in Hindi.
Python tutorial in Hindi for CBSE class XI & class XII computer science students.

#pythonprogramming #pythonforbeginners #pythoninhindi #python #pythoncoding #pythonprograms
Рекомендации по теме