Write a program including a function named 'sumlist' which calculates the sum of all numbers in the given list.
First line of input is n
then n
lines of numbers follows.
برنامه ای بنویسید شامل یک تابع به نام sumlist که مجموع اعداد لیست را محاسبه کند
ورودی شامل یک عدد n و سپس n عدد برای اعضای لیست.
4
8
6
2
10
30