Python solution to Excel Challenge -Is the string sorted?
HTML-код
- Опубликовано: 9 окт 2023
- is the string sorted excel? This solution uses python in Excel and shows a few tips for using python. In this Excel challenge, we filter out strings that are sorted(i.e the characters of the string/word are in alphabetical order). Sort the string alphabetically and compare with the string itself to know if it is sorted or not.
Workbook link: 1drv.ms/x/s!AjKsNBbkfPQnznfxf...
Always useful to show multiple ways of solving the same problem. Python is going to be a game changer. Thanks.
Absolutely. These days, there has to be more than one way to solve an excel problem
Brilliant and impressive, as always. Certainly Python proves to be a high-level language that condenses the formulas compared to what is achieved with Excel. Thanks Victor, for this great demonstration of "syntax sugar".
Thanks Ivan for your comments and yes, I called it syntax sugar 😁😁
Just getting used to the new LAMDA formulas in Excel, not sure I can handle Python as well!! Interesting to see though, thanks Victor
I will keep it as a separate playlist, so for most problems I probably would still have the formula(likely LAMBDA solutions) which maybe what most people can assimilate at this time
HI Victor... Just got python in my excel 365 last Sunday. I will play around with your example. Python seems very intimidating to learn but i will give it a try. Thanks for posting.
If you can write lambdas, then you are probably already ahead of the curve. So you are in good hands 😁
haha! Victor... Thanks to you and your videos on Lambda helper functions . Those are epic!
@jazzista1967 Thanks Luis. I am glad you have found them helpful in your LAMBDA journey
First comment. 😁 (If Diarmuid reads it)
Still trying to crack the Diarmuid 😁😁
Great,
To be a little shorter, it could be as below:
[x for x in xl("A2:A10")[0] if x==''.join(sorted(x))]
Absolutely. If I wanted to totally finish them off 😁😁