-->
当前位置:首页 > 题库

PROGRAMMING:JMU Python repeated element determination

Luz5年前 (2021-05-10)题库432
If only one element appears twice in each list, the list will be judged to contain duplicate elements.
Write a function to determine whether there are duplicate elements in the list. If there are duplicate elements, return 'true', otherwise return 'false'.
Then use this function to process n lines of string. Finally, count the number of rows with duplicate elements and the number of rows without duplicate elements.
###Input format:
Enter n to enter n lines of string.
Then enter n lines of string, and the elements between the strings are separated by spaces.
###Output format:
**True = number of rows with duplicate elements, false = number of rows without duplicate elements**
`There is a space after.
###Input example:
```in
five
1 2 3 4 5
1 3 2 5 4
1 2 3 6 1
1 2 3 2 1
1 1 1 1 1
```
###Output example:
```out
True=3, False=2
```






answer:If there is no answer, please comment