I am not able get the sorted values from the input
<p>problem with sorting</p>

<pre><code>a = raw_input("Do you know the number of inputs ?(y/n)")    
if a == 'y':    
   n = int(input("Enter the number of inputs : "))    
   total = 0    
   i = 1    
  while i &lt;= n:     
   s = input()    
   total = total + int(s)    
   i = i + 1    
   s.sort()    
   print s     
   print('The sum is ' + str(total))
</code></pre>

<pre><code>n = int(input("Enter the number of inputs : "))
total = 0
i = 1
array = []
while i &lt;= n:
    s = int(input())
    array.append(s)
    total = total + int(s)
    i = i + 1
array.sort()
print(array) 
print('The sum is ' + str(total))
</code></pre>

<p>this will solve your problem, sort applies on list not on str object</p>

python