*_I'm watching this video at dawn time.It's 4:00 am right now.Because,yeasterday I could not hear volume of this video properly.But now I'm watching this only because of his nice explanation. Take love from Bangladesh._*
A, B = map(int, input().split()) List = [] for i in range(A): s = input().rstrip() List.append(s) for i in range(B): s = input().rstrip() indices = [index + 1 for index, value in enumerate(List) if value == s] if indices: print(' '.join(map(str, indices))) else: print(-1)
This solution and explanation is so good but the volume is so low that I can't listen it properly even with the headphones but nice explanation thanks
*_I'm watching this video at dawn time.It's 4:00 am right now.Because,yeasterday I could not hear volume of this video properly.But now I'm watching this only because of his nice explanation. Take love from Bangladesh._*
Thanku you , bro
tested my speaker twice haha
A, B = map(int, input().split())
List = []
for i in range(A):
s = input().rstrip()
List.append(s)
for i in range(B):
s = input().rstrip()
indices = [index + 1 for index, value in enumerate(List) if value == s]
if indices:
print(' '.join(map(str, indices)))
else:
print(-1)
Thanks brother for ur support
Thanks man !!!!
your code is not running in jupyter
In For loop Input taken as rstrip() why taken like this and what is the use of the rstrip
video creator doesnot bother to reply anyone.
You can google about rstrip and if not understood I can help you.
your explanation of line 11 is so confusing....you could have simply explained it in hindi
it will append index of the input