First and the Last Digit @ Dcoder

Words
81
Reading
1 min
Listen
Play
3y

Problem: Ron is weak in mathematics.Knowing this fact John challenges him to find the sum of first and last digit of a given number. Help Ron to find the sum of first and last digit of a number.
Input: The first line contains an integer T denoting total number of test cases.
Then in the following T lines, each line contains an integer N.

Output: For each test case, print the sum of first and last digit of N.
Constraints: 1<=T<=100.
10<=N<=100000.
Sample Input: 3
1234
85694
234
Sample Output:
5
12
6

for t in range(int(input())):
  n = list(input())
  print(int(n[0])+int(n[-1]))