Reverse a List Without Using reverse()
# Original list
original_list = [1, 2, 3, 4, 5]
# Create an empty list for the reversed version
reversed_list = []
# Loop through each item in the original list
for item in original_list:
# Add each item to the front of the new list
reversed_list = [item] + reversed_list
# Print the reversed list
print("Reversed list:", reversed_list)