LearnPy Hub
← Tuples & Sets problems
Easy

Search a Tuple

Read words into a tuple, then a target word. Print how many times it appears (count) and its first position (index), or -1 if it is missing.

Input

Two lines.

Output

Two lines.

Sample 1

Input
a b a c
a
Output
2
0

Sample 2

Input
x y z
z
Output
1
2
solution.py
Output appears here
Search a Tuple · Python practice problem · LearnPy Hub