title: Python Lists input- Integers and Strings
body: <p>Is there any way in python where the elements of the list don't get changed.</p>
  
  <p>For eg, integers must remain integers and string must remain string, but this should be done in same program.</p>
  
  <p>The sample code would be:</p>
  
  <pre><code>print("Enter the size of the list:")
  N = int(input())
  for x in range(N):
      x = input("")    
      the_list.append(x)
      the_list.sort()
  
  print(the_list)
  </code></pre>
  
  <p>Result: <code>the_list = ['1','2','3']</code> </p>
  
  <p>is the list of integers where integers have converted to strings which is wrong.</p>
  
  <p>But strings of list must remain strings.</p>