How to change the number into the same expression's string and vice versa?
breamoreboy at yahoo.co.uk
Mon Jan 19 17:41:36 CET 2015
On 19/01/2015 09:01, contro opinion wrote:
> In the python3 console:
> >>> a=18
> >>> b='18'
> >>> str(a) == b
> >>> int(b) == a
> Now how to change a1,a2,a3 into b1,b2,b3 and vice versa?
Giving a completely different take on previous answers how about.
a1, b1 = b1, a1
a2, b2 = b2, a2
a3, b3 = b3, a3
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
More information about the Python-list