2020年12月24日星期四

Formatting a list to print out common numbers

I want to write a function that goes through all 3 of the lists down below and would print out the numbers that are present on all 3. Like how the number 23 is present on all 3 lists.

list_1 =[27, 20, 22, 21, 17, 12, 24, 23, 19, 14, 11, 26, 25, 13, 15, 21, 18, 28, 29, 10]  list_2 = [14, 25, 26, 21, 22, 17, 11, 23, 27, 18, 24, 28, 12, 29, 16, 19, 13, 10, 20, 15]  list_3 = [19, 21, 11, 24, 16, 17, 18, 22, 26, 10, 23, 29, 27, 13, 25, 14, 15, 20, 28, 12]  
https://stackoverflow.com/questions/65442460/formatting-a-list-to-print-out-common-numbers December 25, 2020 at 03:16AM

没有评论:

发表评论