Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Such complex nested constructs should never be used, they are very difficult to read. By the way, list comprehensions will not add any performance here. It's better to make the code more readable:
n = int(input())
w = []
count = int(input())
for _ in range(count):
w.append(input())
for i in w:
if 1 <= n <= len(i):
print(i[n - 1], end='')
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question