You could combine your input to a single line to improve ease of use. For example,
storage = input("Enter values separated by spaces:")
storage = [int(x) for x in storage.split()]
This way you have the entire list of input and can avoid having to have the user enter the number of input, and avoid having to declare the num variable at all.
However, you probably also want to include some form of input validation or throw a meaningful error as right now if your user was to enter non-integers, your program would simply crash and output a vague error that the user would probably have a difficult time understanding.
try:
storage = [int(x) for x in test.split()]
except ValueError:
print("Non-integers in input!")
Alternatively, you could check if all the values are numeric and if not, have the user re-enter their input.
As for your sorting algorithm, if you don't want to use Python's implemented sort() or sorted(), you should research more efficient algorithm's such as quick sort or even implement the bubble sort that you learned.
Currently, your min_sort algorithm finds the minimum value in the list, which is O(n) then removes that element from the list (separately from the search) which is again O(n). This is extremely wasteful as you may end up searching through the entire list again and again (n times), so it would be better to use a more efficient sorting algorithm or at least recognize that we don't need to pass through the entire list twice on each iteration, just pass through the list once and keep track of the minimum value. You could do this by writing your own function like:
def find_remove_min(nums):
"""Returns the minimum number and the list without the min number"""
if nums:
min_index = 0
for i in range(1, len(nums)):
if nums[i] < nums[min_index]:
min_index = i
return nums[min_index], nums[:min_index] + nums[min_index+1:]
Then you could do something like,
while storage:
min_num, storage = find_remove_min(storage)
result.append(min_num)
which would be more readable and efficient imo.
sorted()
? Does the solution have to follow this idea of finding minimum from the rest of the elements? (selection sort like) \$\endgroup\$