hi,
i'm having trouble taking say the input of the user and converting it to the right type of format i need in order to compare them.
An example is say I have the number 1234 and that is assigned to the variable x and the string value of that is assigned to y. How would i go from this string to one which looked like ?
I thought i would iterate over the string and append each value, however i was unsuccessful with this code.
a=[]
x=1234
y=str(x)
for i in y:
a.append(str(y))
The reason i am doing this is so i can compare this to another value with a simliar format, as well as a side function to this i would like to convert this format back to just a string however for that part I am lost.
cheers for any help you can give me