LearnPy Hub
← Exploratory Data Analysis (EDA) problems
Easy

Spot the Repeats

Print how many rows are exact duplicates of an earlier row, then how many rows are left after removing them.

Input

A CSV table: a header line, then one line per row (an empty field means a missing value), then a line END.

Output

Two integers on two lines.

Sample 1

Input
id,val
1,10
2,20
1,10
3,30
2,20
1,10
END
Output
3
3

Sample 2

Input
dept,hours,score
CSE,12,85
EEE,5,52
CSE,,78
BBA,2,31
EEE,7,
END
Output
0
5
solution.py
Output appears here
Hints
Spot the Repeats · Python practice problem · LearnPy Hub