Thanks! This works and it only takes up 4 lines of code. The computation time is also much faster than my code. I think that I understand why it works faster as well. Your code executes after looping 23 times. However, my code executes after 11 iterations of 23 or 253 iterations which is 11 times more than my code. Also, it took 13.7 milliseconds, whereas as mine took 185 milliseconds which is 13.5 times as fast. I suspect that the method that I used where I changed my list into a set and then returned to transform it into a list also took more time than your method you recommended to me, which could partially explain the discrepancy in computation time as well.
input() takes a string to display and the it is up to the user to enter a value. As long as the input is a valid int you should be safe to convert the input to int
To print a variable value you just need to use the literal without quotes.
Here is a slightly modified version of your code that should work.
svar = input('Enter a number')
y = x * x