You are on page 1of 7

A) print the following pattern

*
**
***
****
*****
B) Python | Check if two lists have at least one element common

Given two lists a, b. Check if two lists have at least one element common in them.
Input : a = [1, 2, 3, 4, 5]
b = [5, 6, 7, 8, 9]
Output : True
Input : a=[1, 2, 3, 4, 5]
b=[6, 7, 8, 9] Output : False

ANS.
C)

Given a string. The task is to print all words with even


length in the given string
ANS.

You might also like