Q3.When will the following code snippet output `True`?
```
word_1 = input()
word_2 = input()
flag = True
if len(word_1) < len(word_2):
for ch in word_1:
if ch not in word_2:
flag = False
else:
for ch in word_2:
if ch not in word_1:
flag = False
print(flag)
```
Save
Check
Details
Q3
27 Oct 2024
Q3.When will the following code snippet output `True`?
```
word_1 = input()
word_2 = input()
flag = True
if len(word_1) < len(word_2):
for ch in word_1:
if ch not in word_2:
flag = False
else:
for ch in word_2:
if ch not in word_1:
flag = False
print(flag)
```