First of all your code is incomplete. The error which it is showing is indentation error.
Please note that your
try: part should be having a tab space after your def function.
except : part should also be properly indented with try:part
no sir my code is complete bcz of window cut by snipping tool its showing like half of the code is written
Notice your return statement is not properly indented.
sir thatz what is error if i shift into function its saying shift out thn i shift out showing unindented
See you are having an indentation problem which is being also suggested by the server. Just properly align your return statement with the print statement and your except part with the try.
In case of further problem just re-check your code with that provided in the documentation.
Even though if you are not getting the desired output, just copy paste the code from the documentation and check where you are going wrong.
Whenever I’ve encountered this error, it’s because I’ve somehow mixed up tabs and spaces in my editor.
are you sure you are not using both tabs and spaces?
If so, the just use spaces.
yes sir m not using tabs and spaces together and in VMware there is not the option of even paste. So eventually have to write the code again. If encounter any error will update
Please post your code for further understanding.
even I’m facing the same problem