Couldn't really find it, but probably it's me not knowing how to search properly :(
Just wanted to find out what the name is for:
[x for x in some_list]
type of construct?
This is just standard Python list comprehension. It's a different way of writing a longer for loop. You're looping over all the characters in your string and putting them in the list if the character is a digit.
It means that the function you have called returns an iterable, and the index 0 of the iterable is assigned to x and the index 1 is assigned to y.
It's a list comprehension
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With