You can add tags to your solution files that will hide the solution when it is opened by the student, but the code can remain there for your testing. Documentation for this feature is here:
Example
The file as you prepare it:
For def bubble_sort(list1):
# CODIO SOLUTION BEGIN
for i in range(0,len(list1)-1):
for j in range(len(list1)-1):
if(list1[j]>list1[j+1]):
temp = list1[j]
list1[j] = list1[j+1]
list1[j+1] = temp
return list1
# CODIO SOLUTION END
list1 = [5, 3, 8, 6, 7, 2]
print("The unsorted list is: ", list1)
print("The sorted list is: ", bubble_sort(list1))
The file as the students see it:
For def bubble_sort(list1):
# WRITE YOUR CODE HERE
list1 = [5, 3, 8, 6, 7, 2]
print("The unsorted list is: ", list1)
print("The sorted list is: ", bubble_sort(list1))