Post

Python Programming
Python Programming@PythonPr·
What is The Difference 🤔 Comment your answer 💯
Python Programming tweet media
English
5
7
46
5K
Ari Okkonen
Ari Okkonen@AriOkkonen·
@PythonPr I understand that in addition to that deffun error the if statement has an empty then block in the latter example.
English
0
0
1
39
Cyber_Emmanuel
Cyber_Emmanuel@CEmmanuel66646·
@PythonPr def fun(n): is valid Python syntax. deffun(n): is invalid because def must be followed by a space and a function name. The second snippet raises a SyntaxError, while the first correctly computes 3! = 6.
English
0
0
0
52
Mark S
Mark S@mark18570·
@PythonPr Indentation error in the lower one and "deffun(n)" instead of "def fun(n)"
English
0
0
0
4
Paylaş