
Dear Mdam-Sir. I want to learn about Pyton I see in your information that a book is in Spanish. But not all text are in Spanish language. I understood very well but better the explanation in Spanish. See you hier. https://docs.python.org/es/3/tutorial/introduction.html Además de int<https://docs.python.org/es/3/library/functions.html#int> y float<https://docs.python.org/es/3/library/functions.html#float>, Python admite otros tipos de números, como Decimal<https://docs.python.org/es/3/library/decimal.html#decimal.Decimal> y Fraction<https://docs.python.org/es/3/library/fractions.html#fractions.Fraction>. Python también tiene soporte incorporado para complex numbers<https://docs.python.org/es/3/library/stdtypes.html#typesnumeric>, y usa el sufijo j o J para indicar la parte imaginaria (por ejemplo, 3+5j). 3.1.2. Text Python can manipulate text (represented by type str<https://docs.python.org/es/3/library/stdtypes.html#str>, so-called «strings») as well as numbers. This includes characters «!», words «rabbit», names «Paris», sentences «Got your back.», etc. «Yay! :)». They can be enclosed in single quotes ('...') or double quotes ("...") with the same result 2<https://docs.python.org/es/3/tutorial/introduction.html#id4>.
'spam eggs' # single quotes
'spam eggs'
"Paris rabbit got your back :)! Yay!" # double quotes
'Paris rabbit got your back :)! Yay!'
'1975' # digits and numerals enclosed in quotes are also strings
'1975' To quote a quote, we need to «escape» it, by preceding it with \. Alternatively, we can use the other type of quotation marks:
'doesn\'t' # use \' to escape the single quote...
"doesn't"
"doesn't" # ...or use double quotes instead
"doesn't"
'"Yes," they said.'
'"Yes," they said.'
"\"Yes,\" they said."
'"Yes," they said.'
'"Isn\'t," they said.'
'"Isn\'t," they said.' In the Python shell, the string definition and output string can look different. The print()<https://docs.python.org/es/3/library/functions.html#print> function produces a more readable output, by omitting the enclosing quotes and by printing escaped and special characters:
s = 'First line.\nSecond line.' # \n means newline
s # without print(), special characters are included in the string
'First line.\nSecond line.'
print(s) # with print(), special characters are interpreted, so \n produces new line
First line. Second line. Si no quieres que los caracteres precedidos por \ se interpreten como caracteres especiales, puedes usar cadenas sin formato agregando una r antes de la primera comilla:
print('C:\some\name') # here \n means newline!
C:\some ame
print(r'C:\some\name') # note the r before the quote
C:\some\name There is one subtle aspect to raw strings: a raw string may not end in an odd number of \ characters; see the FAQ entry<https://docs.python.org/es/3/faq/programming.html#faq-programming-raw-string...> for more information and workarounds. Las cadenas de texto literales pueden contener múltiples líneas. Una forma es usar triples comillas: """...""" o '''...'''. Los fin de línea son incluidos automáticamente, pero es posible prevenir esto agregando una \ al final de la línea. Por ejemplo: Verzonden vanuit Mail<https://go.microsoft.com/fwlink/?LinkId=550986> voor Windows

Dear Johanna, The issue you see is connected with the following issue in the Spanish translation project: https://github.com/python/python-docs-es/issues/2339. Feel free to leave your remarks there. The Python documentation translations are community-driven projects. Also they are not finished yet, they're still in progress at the moment. Kind regards, Maciej śr., 13 wrz 2023 o 12:25 Johanna Sterling <johannasterlingpj71@outlook.com> napisał(a):
Dear Mdam-Sir.
I want to learn about Pyton I see in your information that a book is in Spanish.
But not all text are in Spanish language. I understood very well but better the explanation in Spanish.
See you hier. https://docs.python.org/es/3/tutorial/introduction.html
Además de int <https://docs.python.org/es/3/library/functions.html#int> y float <https://docs.python.org/es/3/library/functions.html#float>, Python admite otros tipos de números, como Decimal <https://docs.python.org/es/3/library/decimal.html#decimal.Decimal> y Fraction <https://docs.python.org/es/3/library/fractions.html#fractions.Fraction>. Python también tiene soporte incorporado para complex numbers <https://docs.python.org/es/3/library/stdtypes.html#typesnumeric>, y usa el sufijo j o J para indicar la parte imaginaria (por ejemplo, 3+5j).
*3.1.2. **Text*
Python can manipulate text (represented by type str <https://docs.python.org/es/3/library/stdtypes.html#str>, so-called «strings») as well as numbers. This includes characters «!», words «rabbit», names «Paris», sentences «Got your back.», etc. «Yay! :)». They can be enclosed in single quotes ('...') or double quotes ("...") with the same result 2 <https://docs.python.org/es/3/tutorial/introduction.html#id4>.
*>>> *'spam eggs' *# single quotes*
'spam eggs'
*>>> *"Paris rabbit got your back :)! Yay!" *# double quotes*
'Paris rabbit got your back :)! Yay!'
*>>> *'1975' *# digits and numerals enclosed in quotes are also strings*
'1975'
To quote a quote, we need to «escape» it, by preceding it with \. Alternatively, we can use the other type of quotation marks:
*>>> *'doesn*\'*t' *# use \' to escape the single quote...*
"doesn't"
*>>> *"doesn't" *# ...or use double quotes instead*
"doesn't"
*>>> *'"Yes," they said.'
'"Yes," they said.'
*>>> *"*\"*Yes,*\"* they said."
'"Yes," they said.'
*>>> *'"Isn*\'*t," they said.'
'"Isn\'t," they said.'
In the Python shell, the string definition and output string can look different. The print() <https://docs.python.org/es/3/library/functions.html#print> function produces a more readable output, by omitting the enclosing quotes and by printing escaped and special characters:
*>>> *s = 'First line.*\n*Second line.' *# \n means newline*
*>>> *s *# without print(), special characters are included in the string*
'First line.\nSecond line.'
*>>> *print(s) *# with print(), special characters are interpreted, so \n produces new line*
First line.
Second line.
Si no quieres que los caracteres precedidos por \ se interpreten como caracteres especiales, puedes usar *cadenas sin formato* agregando una r antes de la primera comilla:
*>>> *print('C:\some*\n*ame') *# here \n means newline!*
C:\some
ame
*>>> *print(r'C:\some\name') *# note the r before the quote*
C:\some\name
There is one subtle aspect to raw strings: a raw string may not end in an odd number of \ characters; see the FAQ entry <https://docs.python.org/es/3/faq/programming.html#faq-programming-raw-string...> for more information and workarounds.
Las cadenas de texto literales pueden contener múltiples líneas. Una forma es usar triples comillas: """...""" o '''...'''. Los fin de línea son incluidos automáticamente, pero es posible prevenir esto agregando una \ al final de la línea. Por ejemplo:
Verzonden vanuit Mail <https://go.microsoft.com/fwlink/?LinkId=550986> voor Windows
_______________________________________________ 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/ Member address: maciej.olko@gmail.com
participants (2)
-
Johanna Sterling
-
Maciek Olko