Hi Rushi Sharma,
The documentation is correct, it is print(a, end = ‘ ’). The syntax error
is from your code.
Regards,
Lateefah.
On Sun, 26 Sep 2021 at 5:35 PM, <docs-request@python.org> wrote:
Send docs mailing list submissions to
docs@python.org
To subscribe or unsubscribe via the World Wide Web, visit
https://mail.python.org/mailman3/lists/docs.python.org/
or, via email, send a message with subject or body 'help' to
docs-request@python.org
You can reach the person managing the list at
docs-owner@python.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of docs digest..."Today's Topics:
1. <documentation>In section 4.6. Defining Functions, It should be
print(a,end==' ') in place of print(a, end=' ')
(Ruchi Sharma)
2. Re: <documentation>In section 4.6. Defining Functions, It should be
print(a,end==' ') in place of print(a, end=' ')
(Ruchi Sharma)
---------- Forwarded message ----------
From: Ruchi Sharma <rohilla.ruchi@gmail.com>
To: docs@python.org
Cc:
Bcc:
Date: Sat, 25 Sep 2021 22:57:46 +0530
Subject: [docs] <documentation>In section 4.6. Defining Functions, It
should be print(a,end==' ') in place of print(a, end=' ')
Hi Team,
I am a beginner in python. I was going through the documentation for the
first time.
This link: https://docs.python.org/3.8/tutorial/controlflow.html
In section 4.6. Defining Functions, It should be print(a,end==' '). "=="
in place of "=".
Please correct it. Let me correct if I am wrong.
def fib(n): # write Fibonacci series up to n ... """Print a Fibonacci
series up to n.""" ... a, b = 0, 1 ... while a < n: ... print(a, end=' ') ...
a, b = b, a+b ... print() ... >>> # Now call the function we just defined: ...
fib(2000)
Regards,
Ruchi Sharma
---------- Forwarded message ----------
From: Ruchi Sharma <rohilla.ruchi@gmail.com>
To: docs@python.org
Cc:
Bcc:
Date: Sat, 25 Sep 2021 23:10:46 +0530
Subject: [docs] Re: <documentation>In section 4.6. Defining Functions, It
should be print(a,end==' ') in place of print(a, end=' ')
In the reference to below email :
print(a, end=' ')
I am getting SyntaxError: invalid syntax after the above line code
Kindly help
On Sat, 25 Sept 2021 at 22:57, Ruchi Sharma <rohilla.ruchi@gmail.com>
wrote:
Hi Team,
I am a beginner in python. I was going through the documentation for the
first time.
This link: https://docs.python.org/3.8/tutorial/controlflow.html
In section 4.6. Defining Functions, It should be print(a,end==' '). "=="
in place of "=".
Please correct it. Let me correct if I am wrong.
def fib(n): # write Fibonacci series up to n ... """Print a
Fibonacci series up to n.""" ... a, b = 0, 1 ... while a < n: ... print(a,
end=' ') ... a, b = b, a+b ... print() ... >>> # Now call the function
we just defined: ... fib(2000)
Regards,
Ruchi Sharma
_______________________________________________
docs mailing list -- docs@python.org
To unsubscribe send an email to docs-leave@python.org
https://mail.python.org/mailman3/lists/docs.python.org/