A cartoon network?
Never-mind, I put my glasses on!
Never-mind, I put my glasses on!
From noun to verb
|
||||||||
A cartoon network?
Never-mind, I put my glasses on!
May-23-2017, 11:18 PM
I tried it and got this:
May-23-2017, 11:28 PM
Your second condition is never met because it is the exact same condition as the first.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness. Recommended Tutorials: BBCode, functions, classes, text adventures
May-24-2017, 08:05 AM
Oh yeah, you're right
![]() Thanks for your remark. Now, this wokrs:
May-24-2017, 09:49 AM
You check against an empty list. It evaluates to False:
May-24-2017, 10:59 AM
All right thanks a lot!
One last question: How would you implement "exceptional" words for which there is no rule? Example: Klasse --> klassifizieren Adresse --> adressieren Schablone --> schablonisieren Would you save this as dictionary, or how?
Catching a general exception just with
except: is not a good practice. What happens if the data can't be loaded. You return None or [] and you're thinking that something with your code is wrong or data is corrupted or something else.Do some tests to see the most error you may get. You can chain the exceptions one after another.
May-24-2017, 08:43 PM
@wavic, shouldn't there be nots in all of the ifs in your last bit of code. That is, isn't
if some_list == []: equivalent to if not some_list: ?
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness. Recommended Tutorials: BBCode, functions, classes, text adventures
May-24-2017, 11:18 PM
Yes
if some_list == []: is like if not some_list: Thanks for the correction | ||||||||
|