+ 2
Can we use if statement inside finally statement?
9 Answers
+ 1
Saurabh Sen = is assignment operator and not comparison. Use == instead.
+ 6
Saurabh Sen Yes I know. I just want to say in any language we can do same.
+ 4
Of course. finally statement is just like another block of statements. You can do anything inside them. You can use for/while loops, if/else/elif statements and even another try-except-finally block.
+ 3
Saurabh Sen Yes you can do any operation in finally block. Remember finally block always execute
https://code.sololearn.com/cXSi99M39v3F/?ref=app
+ 2
Yes.
+ 1
@XXX yes dude i forgot that one
+ 1
@Aj Anant tag - python