thank you 👍.it was really useful
They iterate lst, not x, it's called list comprehension, you can read more here: https://www.programiz.com/python-programming/list-comprehension
Edit: didn't mean to post this
Read the error message you get:
TypeError: 'int' object is not iterable
x is an int, you can't make a list of it. Even if you could, it would return a list of the first number.
This comment is hidden because it contains spoiler information about the solution
If description doesn't say otherwise then using already existing functions is pretty good approach. In any case everyone is free in ways of solving.
this is technically legal, and elegant, and the authors can't be faulted for using this because it wasn't prohibited, but it defeats the purpose of the kata if you can just use a built in string method at least in my mind.
this gives error when v is 0. should be >=
I did not know swapcase existed. now I know
Well... a man learns all his life.
Oh man, that's way simpler than what I did.
Glad that I now know this shortcut!
*2 is not the same as **2