From f130d70a5b1beb6f7c6d801a73e923cbe246ee3a Mon Sep 17 00:00:00 2001 From: deyanpeev Date: Sat, 12 Nov 2022 19:49:26 +0200 Subject: [PATCH] problem 4 homework 4 --- Seminar 4/homework/problem4.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Seminar 4/homework/problem4.md diff --git a/Seminar 4/homework/problem4.md b/Seminar 4/homework/problem4.md new file mode 100644 index 0000000..c19ad3c --- /dev/null +++ b/Seminar 4/homework/problem4.md @@ -0,0 +1,24 @@ +# Find common elements + +Given a list of lists, print the common elements in all lists + +The list string is preset in the program and not passed as input. + +--- +Sample input: +``` python +[[2, 17, 3, 4, 17], [2, 3, 1, 2], [82, 2, 4, 3, 20, 60 , 4, 4]] +``` +Sample output: +``` +2, 3 +``` +--- +Sample input: +``` python +[['a', 'b', 'c'], ['b', 'c', 'd'], ['c', 'd', 'e']] +``` +Sample output: +``` +c +``` \ No newline at end of file