+ 1
Identify a difference between C# and Python
in c# we identify the code of the function by putting it between { } but in python we start with : it's easy but how can I know the end of the function code and what will happen if I nested more than if together is the spaces i left in the beginning of each line will be the only difference as a beginner with Python it could be a problem for me and thanks in advance ☺☺
5 odpowiedzi
+ 12
You accidentally made a duplicate, please remove one
+ 10
You're welcome :)
+ 9
Use tabulations (spaces at the beginning of each lines) so that Python knows what is considered as inside of a block and what isn't ;)
+ 2
okay thanks
+ 2
pythons function body is 4 space indent if it has a nested statement its another 4 and so on. So if a new line is not indented its not part of the function.