Try Except Versus if Else
Contents
Lets say we want to access the first fruit but we don’t know if the list has any fruits in it.
You would ask: Are there any fruits?
|
|
Why not take what you want straight forward..
|
|
..and if it is not there forgive yourself :)