 Python.     
 


    Python        .               .      ,  ,   -,     .         ,    .      ,            .





 

 Python.     








 ,  !

    (  )  ,        , ,    Python,   ,      .       ,      .     ,    ,     ,           .

     ,  :    ,         ,         .     ,    .      Python   ,   ,         .

    ? *  ,       Excel, Word  . *    IT-,      . *   ,         . *    ,              .

    :  Python,                .             ,       .     ,    ,            .

         (     ),         . ,       ,    ,      .

         ?      !




 1.  Python  





  Python   



,      .   ,  ,    ,  ,     , .         .  ,   . Python     -,  ,    ,  :  ,   ,  .        ,  ,           .     .

  Python?        .      .    ,    ,       .     ,      . Python    ,       .    ,     ,        .      ,       ,       .         ,     ,     .




 Python


  Python        ,             .      python.org.   ,    .           Downloads.   ,  ,  ,           Windows, macOS  Linux.     .

    .   ,    ,  ,       : Add Python to PATH.      .       .   PATH?       .    ,   : , ,     - Python,      ,   .    ,    ,      ,      ,   .     Install Now.        .




 


   ,         Python.   .  Windows          cmd   Enter.  macOS      Spotlight.        .  ,      .     : python version.   Enter.     ,      -  Python 3.11.4.     Python    ,       .     ,    , ,     PATH  .  ,  ,     ,       Python  PATH   .       .




  


,    ,  ,      . , ,     ,      ,       .    ,  .            (IDE).

         IDE.        ,     .     ,   Python.      Visual Studio Code (  VS Code).     ,   .  ,          Python,      .            .py.          Python.

          test.py.    VS Code     .    : print(,   Python!).  .    ,      ( cd Desktop   )    python test.py.        . ,       !      ,    .




  


       .  :     ?,     .   .    ,              .      ?  , .    ,    .    .     .     ,    Python     .         ,       .       .   . ,         , ,   ,  . ,        .




   



,      .     ,      .         ,    ___.  ,      ,     .    ,  ,        . Python   .

      ,    ,  -  ,    .      .   Python    ,    - ,    .           .       ,   ,     .

__ = 42 __ =   _ = True

              .        ,  Python   .  42    , ,   ,    integer ( int).        ,  string (str).   True (   False)    ,  boolean (bool),      ,  .  -   :     ,       ,      .




   


     .    - : 10, -5, 0, 100500. Python      ,        float. ,  36.6,   75.43     3.14159    float.        ,     .

   ,    .      , ,        .        :  ,   ,  ,   -.     ,              .

  ,       ,    .    Python       (list).      ,      .   = [, , , ].       ,   .      ,  ,       ,        .

  ,      (dict),       - (      ),   (tuple)   .       , ,    .




 Python ,   


    Python    .      :     ,        .     ,  Python      : ,  ,  ,    ,  .  ,           ,  ,  Python   .     ,    .

     ,     .     type().     ,     ,  .

  : _ = 100.   : print(type(_)).  Python  : <class int>.  ,     .     ,    <class str>.      ,  -       ,       ,      .




  


    ,        .    . ,     ,    .      10,  Python   10.          5,   .     .    -: int(), float(), str().

__ = 10 _ = int(__)  = _ + 5 #  15

  :         .         str()       .        ,                   .

        .      ?     (),    (),    ( ,         ),    .          . ,     ,       ,       .                       .

,        ,        ,        .      ,              .       .     :     ,     ,      . ,        .




  



     .  ,       .      :   ,       .    ,    .  ,   , ,  ,             .         .   -         ,  .              .

      .          .      ,   :    ,  ,      .      ,     ,     , ,       .




       


 Python      if,        .        .     (),   ,  ,    (True).

     . ,    ,  ,        .txt.   :       .txt?  ,  ,  ,  ,    .      :  - ,    .   ,      :   ,  ,     ,       .

  ,    ?      else ().    .    , ,  ,         .          elif,    .     :   ,   ,   ,     . , ,    ,     :   .jpg    ,   .mp3   ,   .pdf   ,     .           .   ,       ?     ,     .




  ,   


        .            ,   . ,                .       .          .

 Python      .     for.       . ,      ,     .    ,   ,  .  ,    ,    .  for   :     -  (,   )        .    ,         .   :        -.   .      ,      :   ,    ,   .

    while,    .     :   ,    .     ,   .      ( )   ,     (    ). ,     ,       ,     .  ,      ,     .         ,    ,     .        ,        ,      .




 :   


  ,       .            ,          .         :  for      ,      if  -  (,   10      ).        ,  ,  .

   . ,  ,      .   : _01.pdf, data_final.xlsx, _.docx  .     Excel-,    ,        .     ,   .xlsx,   ,  , .   .        .   :    ,         .xlsx         ,      .    ,   for, if        .

  ,        ? ,      ?       ?         ?        ,  . ,       ,     .

          .       ,    .    ,     .    .               .   ,   ,      ,       .   , ,     .








         :  ,   .  ,        .  ,    .             :  ,  ,  ,  .       ,  , ,  ,     :    ,    .   ,      .       .

     ,    ,    .      ,    ,     (,   , )         .    .    - ( ),     ,    .            ,    .    .




  


   Python     def.    define,   .     ,  ,     . ,    ,    (  ) .    ,   ,    .

def (): print(,  !)

      .   .  ,        .   ,     :     .     ,   .          .  : ().      .          ,     ,    ,  ,       .  ,      ?

  ,           ,       .      .       ,       .           .    .

def __(): print(,, , !     !)

,      ,       ,        . , __()  __(Excel-).       .




,  - 


     -  (,  ),   -    .  .        .              .         return (   ).

 ,        .

def (, b):  =  + b return 

  ?     (       b).     ,   .    return     ,   .   .     (5, 3)     .     8   .          .   : print((5, 3)).       : _ = (5, 3).         .        ,     .




    


        .     . ,   .        :     ,     ,    ,         .         .    ___,  _,  _.        ,       :

 = ___(_.csv) _ = _()  = _(_) _(, __.xlsx)

,     ,   ?    ,          ,    _.csv.      !         .      ,     .       ,             _,        ,    .

        . ,      _2024_01.jpg?          ,      ?       ,   ,    .   ,      ,    ,    ?




 :   


        .     ,   . Python       .  :          . ,   .       ,      .

def _(_, _=.): _ = os.path.join(_, _) os.mkdir(_)

 .      . ,      _(),      ,    .       - ,      : _(, C:/).   ,         ,        .

    ,      ,      .      ,    ,    .     ,      .   .           ,    def,   .  ,       .  ,          ,       .




    



      . , , ,      ,      ,   ,     .  ,     ,  ,        :    ,    ,     .         ,     .        . ,       ,  . , , ,  .      ,          .

 ,     , .   ,   ,  -   .    -     :   ,  ,      ,  -     .      ,   -      .             Python,        ,      ,   ,     ,   .




  :   


   .  Python       ,       .        . r      (read), w    (write,      !), a    (append)   .  ,     .  r      .  w        .  a          .

  ,    .          .      ,    -  .       ,       ,    ,       .      .      ,     . Python    :    with,    ,       .    ,      .

  ,     -         .     ?   ,        ,           .      ,     .




  :  


   ,       ,   .         :   ,  ,   .      w.  .        w  -   ,     .               .   :   ,   ,   .  a     ,         ,      .

     ,       .    . ,    CSV-  ,     ,        .    ,              .    ,     .   ,                ? ,     ,       .        .




-   :  


     .      secret_plans.txt,     .    Python         FileNotFoundError.  ,   ,  .             ,     .       .

      ,  : ,   -,     ,  !.         ,     .     try-except.   (try)    , ,  .    ,  except .    (  ),       except,     :   ,   ,      .




  .


   .

   ,     (https://www.litres.ru/pages/biblio_book/?art=73136923)  .

      Visa, MasterCard, Maestro,    ,   ,     ,  PayPal, WebMoney, ., QIWI ,       .


