title: Storing the output into one list
body: <p>Here is my code for the question discussed in this video <a href="https://www.youtube.com/watch?v=XCeDBWI4sa4" rel="nofollow noreferrer">https://www.youtube.com/watch?v=XCeDBWI4sa4</a>
  I have not completed writing the final code as I'm stuck half-way.</p>
  <pre><code>a=list(map(int,input().strip().split())) # takes input as a list
  for k in range(0,len(a)):
      b=str(a[k]) #turns each element in the list a into a string
      d=[int(c) for c in str(b)] #divides the digits of one element in the string b, for example, 456 will be divided into three different elements in the list as 4,5,6
      d.sort() #sorts the list in ascending order
      final=[]
      e=d[0]*7+d[-1]*11 #multiplies smallest digit by 7 and largest by 11 and adds the results
      f= list(map(int, str(e))) #turns e into a string, stores each digit as int into the list f
      if len(f)&gt;2: #removes the MSB from the list if number is bigger than 2 digits
          del f[0]
          strings = [str(x) for x in f]  # turns the list into an integer and adds into the list final
          a_string = &quot;&quot;.join(strings)
          an_integer = int(a_string)
          final.append(an_integer)
      else:
          strings = [str(x) for x in f] # turns the list into an integer and adds into the list final
          a_string = &quot;&quot;.join(strings)
          an_integer = int(a_string)
          final.append(an_integer)
      print(final)
  </code></pre>
  <p>I want the list &quot;final&quot; to have all the elements' bit score but I get my output as different lists like so:</p>
  <pre><code>234 567                                                                                                                       
  [58]                                                                                                                          
  [12] 
  </code></pre>
  <p>How do I get the output as:</p>
  <pre><code>58 12
  </code></pre>
  <p>Sorry if the question is confusing. I'm a rookie, easy solutions will be appreciated. :)</p>