I like this.
Even simpler than lambda and/or without relying on other modules
And here I am. Founding out about: if c not in "0123456789". Thanks my man!
gago ang galing amputa!!
sometimes I am so stupid it is astounding. I make things so much harder than it needs to be
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
you don't have to write parenthesis after return. You can simply do return True/False.
I'm encountering some strange timeouts. The 2 large tests in this kata involve pairs of lists each with a length of 1000 and I'm getting a timeout before the first large test completes. When running locally against tests with lists 2 orders of magnitude greater in size (ie. length of 100,000 each) my code completes in 0.15 seconds.
See negation (arithmetic) among Python operators.
Spoiler flag please.