Question DSA-STR-0041
MediumWhat is the output of this code?
s = "programming"
seen, first = set(), None
for c in s:
if c in seen:
first = c
break
seen.add(c)
print(first)
- A.
r
- B.
p
- C.
g
- D.
m
Sign up free to see the answer and a step-by-step explanation.