Question DSA-STR-0042
MediumWhat is the output of this code?
from collections import Counter
s = "swiss"
c = Counter(s)
print(next(ch for ch in s if c[ch] == 1))
- A.
i
- B.
w
- C.
None
- D.
s
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Strings question
What is the output of this code?
from collections import Counter
s = "swiss"
c = Counter(s)
print(next(ch for ch in s if c[ch] == 1))
i
w
None
s
Sign up free to see the answer and a step-by-step explanation.