notebook.community
Edit and run
In [7]: #Exercis 7 def main(): a = [1, 4, 9, 16, 25, 36, 49, 64, 81, 100] c = [i for i in a if i % 2 == 0] print(c) if __name__ == '__main__': main()
#Exercis 7 def main(): a = [1, 4, 9, 16, 25, 36, 49, 64, 81, 100] c = [i for i in a if i % 2 == 0] print(c) if __name__ == '__main__': main()
[4, 16, 36, 64, 100]
In [ ]: