, ? - , . , .
# . .
:
print(' ') # print .
:
# print .
print(' ')
:
-
-
-
- .
- .
'' , '' ..
, . , !
5, 1.23 ' ' "It's a string!" .
- . 2 , - . , .
- .
2 .
( ) 3.23 52.3E-4. E 10- . , 52.3E-4 52.3 * 10^-4 .
long . int .
. .
, .
, ' '.
, , .
, . "What's your name?".
(""" ''') . . :
''' - . .
.
"What's your name?," I asked.
", ."
'''
, , . , . .
/++
char . , .
/
- .
. format() .
_.py:
= 60
= ' '
print('{0} {1} .'.format(, ))
print(' {0} .'.format())
:
$ python _.py
60 .
{0} .
, , format format .
, {0} format . , {1} format . 0- , 0-, 1-, .
:
+ ' ' + str() + ' .'
. , , format . , format , , .
, , :
= 60
= ' '
print('{} {} .'.format(, ))
print(' {} .'.format())
.
:
= 60
= ' '
print('{} {} .'.format(=, =))
print(' {} .'.format(=))
.
3.6, "f-" :
= 60
= ' '
print(f'{} {} .') # 'f'
print(f' {} .') # 'f'
.
format , . :
# decimal (.) precision of 3 for float '0.333'
print('{0:.3f}'.format(1.0/3))
# (_)
# (^) 13 '______'
print('{0:_^13}'.format(''))
# - ' '
print('{name} {book}'.format(name='', book=''))
:
0.333
______
, print " " (\n) , print . , end :
print('', end='')
print('', end='')
:
end :
print('', end=' ')
print('', end=' ')
print('')
:
(' ) , ? , . "What's your name?". 'What's your name?' , , . , . .'What\'s your name?'. \' : . , 'What\'s your name?' .
, "What's your name?" . , , . , \\.
? , , \n . :
' \n '
, : \t . , .
, , , . ::
" . \
."
" . ."
, r R . :
r" \n ."
. , . ,
'\\1'r'\1' .
- , . . , , , . . , , .
. . :
- , ( ASCII ASCII ) (
_) . - ( ASCII ASCII ), (``) (0-9) .
- . ,
mynamemyName . n , N . -
,_2_3. 2, ,->12_3.
, . , . , .
, . . , .
:
, , .
. , .
, :
- .
- ..
- .
- ..
: , Run-> Edit Configurations , Script parameters: , :

- .
- .
- .
-
python .py .
:
:
# : .py
= 5
print()
= + 1
print()
= ''' - .
.'''
print()
:
5
6
- .
.
. , (=) , 5 . , , , 5 . , print , , .
, 1 , . , 6 .
, , .
. /.
. . .
: print(' ') , , .
, , .
, / (;) . :
= 5
print()
= 5;
print() ;
= 5; print() ;
= 5; print()
, . . , .
: , . :
= ' . \
.'
print()
:
. .
,
= \
5
= 5
, . , , . . , .
. , . . ( ), ; , .
, . . .
, . :
= 5
# !
print(' ', )
print(', ', )
, :
File "whitespace.py", line 3
print(' ', )
^
IndentationError: unexpected indent
. , , . , (, ). . , .
. . . , .
, .
from __future__ import braces .
, . .