Skip to content

Commit 010476b

Browse files
committed
Output program extracts name and age of given person.
1 parent a64d048 commit 010476b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
num_lines = int(input())
2+
3+
for _ in range(num_lines):
4+
person_id = input()
5+
name = person_id[person_id.index("@") + 1:person_id.index("|")]
6+
age = person_id[person_id.index("#") + 1:person_id.index("*")]
7+
8+
print(f"{name} is {age} years old.")

0 commit comments

Comments
 (0)