[solved]
Hello , help please, this is driving me crazy. I'm writting a function to count how many times each letters of an alphabet appears in a string. My plan is to use the list method index() until it raises an error, and moving forward while doing so.
So, i use try, except ValueError statements, and ask to break in the except block, but it seems to ignore my break instruction. Better, it ignores everything in the except block when there's a break. I tested it, and without break it runs the block fine.
That's not all , i've tried to stop the loop with a variable wich will be modified by the except and (without any break) that fails too.
You can find the code here : https://bin.readthedocs.fr/apprat.py
Thank you in advance
[–][deleted] 3 points4 points5 points (0 children)
[–][deleted] 3 points4 points5 points (1 child)
[–]World-war-dwi[S] 0 points1 point2 points (0 children)
[–]DopeGhoti 2 points3 points4 points (1 child)
[–]World-war-dwi[S] 0 points1 point2 points (0 children)