I'm still learning python, so this may seem silly. This is the C++ code i want the python equivalent of:
int t;
for(int i=0;i<n;i++)
{
cin>>t;
ans = do_something(t);
}
cout<<ans;
I can do this by making t a list and then using each element as do_something's parameter, but i want a solution similar to the C++ code. Also input t is taken space separated. Eg
1 2 3 4 5
ans
`