<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5038728009841547747</id><updated>2026-01-09T07:42:33.846-08:00</updated><category term="programare"/><category term="BAZE DE DATE"/><category term="Calculatorul"/><category term="Internet"/><category term="Module"/><category term="HTML"/><category term="Retele"/><category term="procesorul"/><category term="Sursa"/><category term="Initiere"/><category term="HARDWARE"/><category term="Python"/><category term="Site"/><category term="Kali Linux"/><category term="Server"/><category term="MikroElektronika"/><category term="Conexiune"/><category term="Hoax"/><category term="Promo"/><category term="SEO"/><category term="Clase"/><category term="EasyPIC6"/><category term="Ecuatii"/><category term="Kali &#xa; Linux"/><category term="Tv"/><category term="USB"/><category term="pcl"/><title type='text'>Informatica , SEO , Optimizare , HTML , pagini web , Internet</title><subtitle type='html'>Noțiuni Elemtare </subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://infotestpc.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5038728009841547747/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://infotestpc.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/5038728009841547747/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Al Con</name><uri>http://www.blogger.com/profile/17409243868650327707</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>35</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5038728009841547747.post-2708504525158188759</id><published>2025-05-13T10:49:00.000-07:00</published><updated>2025-05-13T16:04:44.608-07:00</updated><title type='text'>Cuvintele Cheie</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzxhlZwT_oCcAeBxafOyZ0T4Q3UF4GTJsXj1v7kPEwll4vIXil5wpjN80OK3iGrHV56QC6R3WIGs4Axhhmd6dKCWMEcBIgN7RB_ppA4zOvlKfhbPcnz4i0HTak2VWNG6HJSvuEJ4nWAPk1HoiXBx9xJzniQFj70x7muFDwiRLatBS3C0TtkMuixE8R/s1024/Trotineta.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;576&quot; data-original-width=&quot;1024&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzxhlZwT_oCcAeBxafOyZ0T4Q3UF4GTJsXj1v7kPEwll4vIXil5wpjN80OK3iGrHV56QC6R3WIGs4Axhhmd6dKCWMEcBIgN7RB_ppA4zOvlKfhbPcnz4i0HTak2VWNG6HJSvuEJ4nWAPk1HoiXBx9xJzniQFj70x7muFDwiRLatBS3C0TtkMuixE8R/s320/Trotineta.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;h2 class=&quot;title _ngcontent-tvx-13&quot; keyboardonlyfocusindicator=&quot;&quot; style=&quot;background-color: white; color: #202124; font-family: &amp;quot;Google Sans&amp;quot;, Roboto, Arial, sans-serif; font-size: 1.375rem; font-weight: 400; letter-spacing: 0px; line-height: 1.75rem; margin: 0px 0px 24px; outline: none; padding: 0px 16px; scrollbar-color: rgb(218, 220, 224) transparent;&quot; tabindex=&quot;-1&quot;&gt;Cele mai bune practici pentru găsirea unor cuvinte cheie noi&lt;/h2&gt;&lt;h3 class=&quot;glue-headline glue-headline--headline-4 glue-spacer-2-bottom&quot; style=&quot;-webkit-font-smoothing: antialiased; background-color: white; box-sizing: border-box; color: #202124; font-family: &amp;quot;Google Sans&amp;quot;, Arial, Helvetica, sans-serif; font-size: 1.5rem; font-weight: 400; line-height: 1.33333; margin: 0px 0px 16px; overflow-wrap: normal; padding: 0px; text-rendering: optimizelegibility;&quot;&gt;&lt;span class=&quot;glue-font-weight-medium&quot; style=&quot;box-sizing: border-box;&quot;&gt;Identificați cuvinte-cheie noi&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #202124; font-family: &amp;quot;Google Sans Text&amp;quot;, Arial, Helvetica, sans-serif; font-size: 16px; letter-spacing: 0.25px; line-height: 1.5; margin: 0px; padding: 0px;&quot;&gt;Căutați cuvinte sau expresii legate de produsele sau serviciile pe care le oferiți. Instrumentul de analiză a cuvintelor-cheie vă va ajuta să identificați cuvintele-cheie cele mai relevante pentru companie.&lt;/p&gt;&lt;p&gt;&lt;span face=&quot;&amp;quot;Google Sans Text&amp;quot;, Arial, Helvetica, sans-serif&quot; style=&quot;background-color: white; color: #3c4043; font-size: 18px; text-align: center;&quot;&gt;Cuvintele-cheie potrivite vă pot afișa anunțul clienților potriviți, iar Planificatorul de cuvinte-cheie Google Ads vă stă la dispoziție.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://ads.google.com/intl/ro_ro/home/tools/keyword-planner/?subid=ro-ro-ha-aw-bk-c-bau!o3~EAIaIQobChMI-e7Np8TMhwMVF01BAh1CDhxCEAAYASACEgIi4_D_BwE~118527414438~kwd-94527731~12314442618~659760229632&amp;amp;utm_source=aw&amp;amp;utm_medium=ha&amp;amp;utm_campaign=ro-ro-ha-aw-bk-c-bau!o3~EAIaIQobChMI-e7Np8TMhwMVF01BAh1CDhxCEAAYASACEgIi4_D_BwE~118527414438~kwd-94527731~12314442618~659760229632&amp;amp;gad_source=5&amp;amp;gclid=EAIaIQobChMI-e7Np8TMhwMVF01BAh1CDhxCEAAYASACEgIi4_D_BwE&amp;amp;gclsrc=aw.ds&quot;&gt;Găsiți cuvintele cheie ale campaniei cu Planificatorul de cuvinte cheie – Google Ads&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://support.google.com/blogger/answer/1269077?hl=ro&amp;amp;ref_topic=6321959&amp;amp;sjid=12987361364493071784-EU&amp;amp;authuser=0&quot;&gt;Faceți publicitate pe blog - Blogger Ajutor&lt;/a&gt;&amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;h1 style=&quot;background-color: white; color: #1f1f1f; font-family: &amp;quot;Google Sans&amp;quot;, &amp;quot;Google Sans Text&amp;quot;, Roboto, sans-serif; font-size: 2rem; font-weight: 400; line-height: 2.5rem; margin: 0px 0px 0.5rem;&quot;&gt;Faceți publicitate pe blog&lt;/h1&gt;&lt;div class=&quot;article-content-container&quot; style=&quot;background-color: white; color: #1f1f1f; font-family: &amp;quot;Google Sans Text&amp;quot;, Roboto, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 14px; outline: none;&quot;&gt;&lt;div class=&quot;cc&quot; style=&quot;font-size: 1rem; letter-spacing: 0.005rem; line-height: 1.5rem; outline: none; overflow-wrap: break-word;&quot;&gt;&lt;p style=&quot;margin: 0.25rem 0px 0.75rem;&quot;&gt;&lt;span style=&quot;font-weight: 600;&quot;&gt;Important:&lt;/span&gt;&amp;nbsp;nu sunt permise reclamele în bloguri destinate adulților. Aflați mai multe despre&amp;nbsp;&lt;a href=&quot;https://www.blogger.com/content.g&quot; rel=&quot;noopener&quot; style=&quot;color: #0b57d0; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;Politica de conținut&lt;/a&gt;&amp;nbsp;și&amp;nbsp;&lt;a href=&quot;https://www.google.com/policies/terms/&quot; rel=&quot;noopener&quot; style=&quot;color: #0b57d0; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;Termenii și condițiile Blogger&lt;/a&gt;.&lt;/p&gt;&lt;p style=&quot;margin: 0.25rem 0px 0.75rem;&quot;&gt;&lt;/p&gt;&lt;p style=&quot;margin: 0.25rem 0px 0.75rem;&quot;&gt;Pentru a câștiga bani cu Blogger, puteți afișa AdSense și alte anunțuri în pagini. Pentru a folosi AdSense, blogul dvs. trebuie să respecte&amp;nbsp;&lt;a href=&quot;https://support.google.com/adsense/answer/10502938&quot; rel=&quot;noopener&quot; style=&quot;color: #0b57d0; text-decoration-line: none;&quot;&gt;politicile&lt;/a&gt;&amp;nbsp;și&amp;nbsp;&lt;a href=&quot;https://support.google.com/adsense/answer/10437795&quot; rel=&quot;noopener&quot; style=&quot;color: #0b57d0; text-decoration-line: none;&quot;&gt;restricțiile&lt;/a&gt;&amp;nbsp;AdSense.&lt;/p&gt;&lt;p style=&quot;margin: 0.25rem 0px 0.75rem;&quot;&gt;&lt;span style=&quot;font-weight: 600;&quot;&gt;Sfat:&lt;/span&gt;&amp;nbsp;&lt;a href=&quot;https://www.blogger.com/content-policy&quot; rel=&quot;noopener&quot; style=&quot;color: #0b57d0; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;Politica de conținut Blogger&lt;/a&gt;&amp;nbsp;și&amp;nbsp;&lt;a href=&quot;https://policies.google.com/terms&quot; rel=&quot;noopener&quot; style=&quot;color: #0b57d0; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;Termenii și condițiile&lt;/a&gt;&amp;nbsp;se aplică în continuare modului în care folosiți Blogger.&lt;/p&gt;&lt;p style=&quot;margin: 0.25rem 0px 0.75rem;&quot;&gt;&lt;a href=&quot;https://www.microsoft.com/en-us/software-download/windows11&quot;&gt;Download Windows 11&lt;/a&gt;&lt;/p&gt;&lt;p style=&quot;margin: 0.25rem 0px 0.75rem;&quot;&gt;&lt;a href=&quot;https://support.google.com/adsense/answer/9724?sjid=12987361364493071784-EU&amp;amp;authuser=0&quot;&gt;Criteriile de eligibilitate pentru AdSense - Google AdSense Ajutor&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-size: 1rem; letter-spacing: 0.08px;&quot;&gt;Conținutul trebuie să fie de înaltă calitate, original și atractiv pentru public. Consultați sfaturile noastre pentru a vă&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;https://support.google.com/adsense/answer/7299563&quot; rel=&quot;noopener&quot; style=&quot;color: #0b57d0; font-size: 1rem; letter-spacing: 0.08px; text-decoration-line: none;&quot;&gt;asigura că paginile site-ului dvs. sunt pregătite pentru AdSense&lt;/a&gt;&lt;span style=&quot;font-size: 1rem; letter-spacing: 0.08px;&quot;&gt;.&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: 1rem; letter-spacing: 0.08px;&quot;&gt;Asigurați-vă că site-ul dvs. respectă&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;https://support.google.com/adsense/answer/48182&quot; style=&quot;color: #0b57d0; font-size: 1rem; letter-spacing: 0.08px; text-decoration-line: none;&quot;&gt;politicile de produs&lt;/a&gt;&lt;span style=&quot;font-size: 1rem; letter-spacing: 0.08px;&quot;&gt;&amp;nbsp;înainte de a vă crea un cont. Rețineți că putem modifica oricând politicile și, conform&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;https://adsense.google.com/adsense/terms&quot; rel=&quot;noopener&quot; style=&quot;color: #0b57d0; font-size: 1rem; letter-spacing: 0.08px; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;Termenilor și condițiilor&lt;/a&gt;&lt;span style=&quot;font-size: 1rem; letter-spacing: 0.08px;&quot;&gt;, este responsabilitatea dvs. să fiți la curent cu acestea.&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin: 0.25rem 0px 0.75rem;&quot;&gt;&lt;/p&gt;&lt;h2 style=&quot;font-family: &amp;quot;Google Sans&amp;quot;, &amp;quot;Google Sans Text&amp;quot;, Roboto, sans-serif; font-size: 1.5rem; font-weight: 400; letter-spacing: 0rem; line-height: 2rem; margin: 2rem 0px 0.5rem;&quot;&gt;Înscrieți-vă la AdSense&lt;/h2&gt;&lt;p style=&quot;margin: 0.25rem 0px 0.75rem;&quot;&gt;&lt;span style=&quot;font-weight: 600;&quot;&gt;Important&lt;/span&gt;: asigurați-vă că urmați toți pașii înainte să dați clic pe&amp;nbsp;&lt;span style=&quot;font-weight: 600;&quot;&gt;Redirecționați&lt;/span&gt;.&lt;/p&gt;&lt;div class=&quot;no-margin&quot; style=&quot;margin: 0px; outline: none;&quot;&gt;&lt;ol style=&quot;margin: 0.25rem 0px 0.75rem; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;li style=&quot;margin: 0.25rem 0px 0.25rem 1.25rem;&quot;&gt;&lt;a href=&quot;https://www.blogger.com/&quot; rel=&quot;noopener&quot; style=&quot;color: #0b57d0; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;Conectați-vă la Blogger&lt;/a&gt;.&lt;/li&gt;&lt;li style=&quot;margin: 0.25rem 0px 0.25rem 1.25rem;&quot;&gt;În stânga sus, selectați un blog.&lt;/li&gt;&lt;li style=&quot;margin: 0.25rem 0px 0.25rem 1.25rem;&quot;&gt;În meniul din stânga, dați clic pe&amp;nbsp;&lt;span style=&quot;font-weight: 600;&quot;&gt;Venituri&amp;nbsp;&lt;/span&gt;&lt;img alt=&quot;apoi&quot; data-alt-src=&quot;//lh3.googleusercontent.com/3_l97rr0GvhSP2XV5OoCkV2ZDTIisAOczrSdzNCBxhIKWrjXjHucxNwocghoUa39gw&quot; data-mime-type=&quot;image/png&quot; height=&quot;18&quot; src=&quot;https://lh3.googleusercontent.com/3_l97rr0GvhSP2XV5OoCkV2ZDTIisAOczrSdzNCBxhIKWrjXjHucxNwocghoUa39gw=w36-h36&quot; style=&quot;max-width: 100%; vertical-align: middle;&quot; width=&quot;18&quot; /&gt;&lt;span style=&quot;font-weight: 600;&quot;&gt;&amp;nbsp;Creați un cont AdSense&lt;/span&gt;.&lt;ul style=&quot;list-style-type: disc; margin: 0.25rem 0px 0.75rem; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;li style=&quot;list-style-type: none; margin: 0.25rem 0px; padding-left: 1rem;&quot;&gt;Dacă blogul nu este eligibil,&amp;nbsp;&lt;a href=&quot;https://support.google.com/adsense/answer/9724&quot; rel=&quot;noopener&quot; style=&quot;color: #0b57d0; text-decoration-line: none;&quot;&gt;aflați cum să vă calificați pentru AdSense&lt;/a&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li style=&quot;margin: 0.25rem 0px 0.25rem 1.25rem;&quot;&gt;Selectați adresa de e-mail Google asociată contului Blogger.&lt;/li&gt;&lt;li style=&quot;margin: 0.25rem 0px 0.25rem 1.25rem;&quot;&gt;Completați formularul AdSense&amp;nbsp;și dați clic pe&amp;nbsp;&lt;span style=&quot;font-weight: 600;&quot;&gt;Creați un cont&lt;/span&gt;.&lt;/li&gt;&lt;li style=&quot;margin: 0.25rem 0px 0.25rem 1.25rem;&quot;&gt;Introduceți detaliile de plată și confirmați numărul de telefon.&lt;/li&gt;&lt;li style=&quot;margin: 0.25rem 0px 0.25rem 1.25rem;&quot;&gt;Dați clic pe&amp;nbsp;&lt;span style=&quot;font-weight: 600;&quot;&gt;Trimiteți&lt;/span&gt;.&lt;ul style=&quot;list-style-type: disc; margin: 0.25rem 0px 0.75rem; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;li style=&quot;list-style-type: none; margin: 0.25rem 0px; padding-left: 1rem;&quot;&gt;Sistemul vă va direcționa automat la Blogger pentru a finaliza procesul. În caz contrar, dați clic pe&amp;nbsp;&lt;span style=&quot;font-weight: 600;&quot;&gt;Redirecționați&lt;/span&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p style=&quot;margin: 0.25rem 0px 0.75rem;&quot;&gt;&lt;span style=&quot;font-weight: 600;&quot;&gt;Sfat&lt;/span&gt;: dacă procesul se întrerupe înainte de a parcurge pașii, urmați din nou pașii 1 – 5. Dacă în pagina de pornire AdSense apare mesajul „Se lucrează la configurare” mai mult de câteva zile, dați clic pe&amp;nbsp;&lt;span style=&quot;font-weight: 600;&quot;&gt;Acceptați asocierea&lt;/span&gt;.&lt;/p&gt;&lt;/div&gt;&lt;h2 style=&quot;font-family: &amp;quot;Google Sans&amp;quot;, &amp;quot;Google Sans Text&amp;quot;, Roboto, sans-serif; font-size: 1.5rem; font-weight: 400; letter-spacing: 0rem; line-height: 2rem; margin: 2rem 0px 0.5rem;&quot;&gt;Afișați anunțuri între postări&lt;/h2&gt;&lt;div class=&quot;no-margin&quot; style=&quot;margin: 0px; outline: none;&quot;&gt;&lt;ol style=&quot;margin: 0.25rem 0px 0.75rem; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;li style=&quot;margin: 0.25rem 0px 0.25rem 1.25rem;&quot;&gt;&lt;a href=&quot;https://www.blogger.com/&quot; rel=&quot;noopener&quot; style=&quot;color: #0b57d0; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;Conectați-vă la Blogger&lt;/a&gt;.&lt;/li&gt;&lt;li style=&quot;margin: 0.25rem 0px 0.25rem 1.25rem;&quot;&gt;În stânga sus, alegeți blogul în care doriți să afișați anunțuri.&lt;/li&gt;&lt;li style=&quot;margin: 0.25rem 0px 0.25rem 1.25rem;&quot;&gt;În meniul din stânga, dați clic pe&amp;nbsp;&lt;span style=&quot;font-weight: 600;&quot;&gt;Aspect&lt;/span&gt;.&lt;/li&gt;&lt;li style=&quot;margin: 0.25rem 0px 0.25rem 1.25rem;&quot;&gt;În funcție de șablon:&lt;ul style=&quot;list-style-type: disc; margin: 0.25rem 0px 0.75rem; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;li style=&quot;list-style-type: none; margin: 0.25rem 0px; padding-left: 1rem;&quot;&gt;&lt;span id=&quot;98180S&quot;&gt;&lt;/span&gt;&lt;span id=&quot;228681S&quot;&gt;&lt;/span&gt;în secțiunea „Postări de pe blog”, sub opțiunea „Corpul paginii”, dați clic pe&amp;nbsp;&lt;span style=&quot;font-weight: 600;&quot;&gt;Modificați&lt;/span&gt;.&lt;span id=&quot;98180E&quot;&gt;&lt;/span&gt;&lt;span id=&quot;228681E&quot;&gt;&lt;/span&gt;;&lt;/li&gt;&lt;li style=&quot;list-style-type: none; margin: 0.25rem 0px; padding-left: 1rem;&quot;&gt;în secțiunea „Postări de pe blog”, sub opțiunea „Principale”, dați clic pe&amp;nbsp;&lt;span style=&quot;font-weight: 600;&quot;&gt;Modificați.&lt;/span&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li style=&quot;margin: 0.25rem 0px 0.25rem 1.25rem;&quot;&gt;Bifați caseta din dreptul opțiunii „Afișați anunțuri între postări”.&lt;/li&gt;&lt;li style=&quot;margin: 0.25rem 0px 0.25rem 1.25rem;&quot;&gt;Alegeți formatul și culorile anunțurilor, precum și frecvența cu care doriți să se afișeze acestea.&lt;/li&gt;&lt;li style=&quot;margin: 0.25rem 0px 0.25rem 1.25rem;&quot;&gt;Dați clic pe&amp;nbsp;&lt;span style=&quot;font-weight: 600;&quot;&gt;Salvați&lt;/span&gt;.&amp;nbsp;&lt;/li&gt;&lt;li style=&quot;margin: 0.25rem 0px 0.25rem 1.25rem;&quot;&gt;Pentru a salva setările, în dreapta jos, dați clic pe Salvați&amp;nbsp;&lt;img alt=&quot;Salvați&quot; class=&quot;18&quot; data-alt-src=&quot;//lh3.googleusercontent.com/usFryoZTu18PlYp_N4KLBC4mz_gT4oGHA9zrbiDEKdFVzrGPowvws4ubWnrch9rc_g&quot; data-mime-type=&quot;image/png&quot; src=&quot;https://lh3.googleusercontent.com/usFryoZTu18PlYp_N4KLBC4mz_gT4oGHA9zrbiDEKdFVzrGPowvws4ubWnrch9rc_g=w36&quot; style=&quot;max-width: 100%; vertical-align: middle;&quot; width=&quot;18&quot; /&gt;.&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;h2 style=&quot;font-family: &amp;quot;Google Sans&amp;quot;, &amp;quot;Google Sans Text&amp;quot;, Roboto, sans-serif; font-size: 1.5rem; font-weight: 400; letter-spacing: 0rem; line-height: 2rem; margin: 2rem 0px 0.5rem;&quot;&gt;Afișați anunțuri în coloane&lt;/h2&gt;&lt;div class=&quot;no-margin&quot; style=&quot;margin: 0px; outline: none;&quot;&gt;&lt;ol style=&quot;margin: 0.25rem 0px 0.75rem; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;li style=&quot;margin: 0.25rem 0px 0.25rem 1.25rem;&quot;&gt;&lt;a href=&quot;https://www.blogger.com/&quot; rel=&quot;noopener&quot; style=&quot;color: #0b57d0; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;Conectați-vă la Blogger&lt;/a&gt;.&lt;/li&gt;&lt;li style=&quot;margin: 0.25rem 0px 0.25rem 1.25rem;&quot;&gt;În stânga sus, alegeți blogul în care doriți să afișați anunțuri.&lt;/li&gt;&lt;li style=&quot;margin: 0.25rem 0px 0.25rem 1.25rem;&quot;&gt;În meniul din stânga, dați clic pe&amp;nbsp;&lt;span style=&quot;font-weight: 600;&quot;&gt;Aspect&lt;/span&gt;.&lt;/li&gt;&lt;li style=&quot;margin: 0.25rem 0px 0.25rem 1.25rem;&quot;&gt;Sub „Bara laterală”, dați clic pe&amp;nbsp;&lt;span style=&quot;font-weight: 600;&quot;&gt;Adăugați un gadget&lt;/span&gt;.&lt;/li&gt;&lt;li style=&quot;margin: 0.25rem 0px 0.25rem 1.25rem;&quot;&gt;Lângă AdSense,&amp;nbsp;dați clic pe Adăugați&amp;nbsp;&lt;img alt=&quot;Adăugați&quot; data-alt-src=&quot;//lh3.googleusercontent.com/31OfHmwH0UICXiHZ3GuWAa2FlE3-ZjZxNk7oV892IKaIdYmv4mfrrOgrBiKo84azBsih&quot; data-mime-type=&quot;image/png&quot; height=&quot;18&quot; src=&quot;https://lh3.googleusercontent.com/31OfHmwH0UICXiHZ3GuWAa2FlE3-ZjZxNk7oV892IKaIdYmv4mfrrOgrBiKo84azBsih=w36-h36&quot; style=&quot;max-width: 100%; vertical-align: middle;&quot; width=&quot;18&quot; /&gt;.&lt;/li&gt;&lt;li style=&quot;margin: 0.25rem 0px 0.25rem 1.25rem;&quot;&gt;Configurați AdSense și dați clic pe&amp;nbsp;&lt;span style=&quot;font-weight: 600;&quot;&gt;Salvați&lt;/span&gt;.&lt;/li&gt;&lt;li style=&quot;margin: 0.25rem 0px 0.25rem 1.25rem;&quot;&gt;Pentru a salva setările, în dreapta jos, dați clic pe Salvați&amp;nbsp;&lt;img alt=&quot;Salvați&quot; class=&quot;18&quot; data-alt-src=&quot;//lh3.googleusercontent.com/usFryoZTu18PlYp_N4KLBC4mz_gT4oGHA9zrbiDEKdFVzrGPowvws4ubWnrch9rc_g&quot; data-mime-type=&quot;image/png&quot; src=&quot;https://lh3.googleusercontent.com/usFryoZTu18PlYp_N4KLBC4mz_gT4oGHA9zrbiDEKdFVzrGPowvws4ubWnrch9rc_g=w36&quot; style=&quot;max-width: 100%; vertical-align: middle;&quot; width=&quot;18&quot; /&gt;.&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;h2 style=&quot;font-family: &amp;quot;Google Sans&amp;quot;, &amp;quot;Google Sans Text&amp;quot;, Roboto, sans-serif; font-size: 1.5rem; font-weight: 400; letter-spacing: 0rem; line-height: 2rem; margin: 2rem 0px 0.5rem;&quot;&gt;Afișați anunțuri de la alte servicii de anunțuri&lt;/h2&gt;&lt;div class=&quot;no-margin&quot; style=&quot;margin: 0px; outline: none;&quot;&gt;&lt;ol style=&quot;margin: 0.25rem 0px 0.75rem; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;li style=&quot;margin: 0.25rem 0px 0.25rem 1.25rem;&quot;&gt;&lt;a href=&quot;https://www.blogger.com/&quot; rel=&quot;noopener&quot; style=&quot;color: #0b57d0; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;Conectați-vă la Blogger&lt;/a&gt;.&lt;/li&gt;&lt;li style=&quot;margin: 0.25rem 0px 0.25rem 1.25rem;&quot;&gt;În stânga sus, alegeți blogul în care doriți să afișați anunțuri.&lt;/li&gt;&lt;li style=&quot;margin: 0.25rem 0px 0.25rem 1.25rem;&quot;&gt;În meniul din stânga, dați clic pe&amp;nbsp;&lt;span style=&quot;font-weight: 600;&quot;&gt;Aspect&lt;/span&gt;.&lt;/li&gt;&lt;li style=&quot;margin: 0.25rem 0px 0.25rem 1.25rem;&quot;&gt;Plasați cursorul pe spațiul în care doriți să afișați anunțuri și&amp;nbsp;dați clic pe&amp;nbsp;&lt;span style=&quot;font-weight: 600;&quot;&gt;Adăugați un gadget&lt;/span&gt;.&lt;/li&gt;&lt;li style=&quot;margin: 0.25rem 0px 0.25rem 1.25rem;&quot;&gt;În fereastra pop-up, lângă&amp;nbsp;„HTML/JavaScript”, dați clic pe Adăugați&amp;nbsp;&lt;img alt=&quot;Adăugați&quot; data-alt-src=&quot;//lh3.googleusercontent.com/31OfHmwH0UICXiHZ3GuWAa2FlE3-ZjZxNk7oV892IKaIdYmv4mfrrOgrBiKo84azBsih&quot; data-mime-type=&quot;image/png&quot; height=&quot;18&quot; src=&quot;https://lh3.googleusercontent.com/31OfHmwH0UICXiHZ3GuWAa2FlE3-ZjZxNk7oV892IKaIdYmv4mfrrOgrBiKo84azBsih=w36-h36&quot; style=&quot;max-width: 100%; vertical-align: middle;&quot; width=&quot;18&quot; /&gt;.&lt;/li&gt;&lt;li style=&quot;margin: 0.25rem 0px 0.25rem 1.25rem;&quot;&gt;Opțional: introduceți un titlu.&lt;/li&gt;&lt;li style=&quot;margin: 0.25rem 0px 0.25rem 1.25rem;&quot;&gt;În secțiunea „Conținut”, copiați și inserați codul din site-ul serviciului publicitar.&lt;/li&gt;&lt;li style=&quot;margin: 0.25rem 0px 0.25rem 1.25rem;&quot;&gt;Dați clic pe&amp;nbsp;&lt;span style=&quot;font-weight: 600;&quot;&gt;Salvați&lt;/span&gt;.&amp;nbsp;&lt;/li&gt;&lt;li style=&quot;margin: 0.25rem 0px 0.25rem 1.25rem;&quot;&gt;Pentru a salva setările, în dreapta jos, dați clic pe Salvați&amp;nbsp;&lt;img alt=&quot;Salvați&quot; class=&quot;18&quot; data-alt-src=&quot;//lh3.googleusercontent.com/usFryoZTu18PlYp_N4KLBC4mz_gT4oGHA9zrbiDEKdFVzrGPowvws4ubWnrch9rc_g&quot; data-mime-type=&quot;image/png&quot; src=&quot;https://lh3.googleusercontent.com/usFryoZTu18PlYp_N4KLBC4mz_gT4oGHA9zrbiDEKdFVzrGPowvws4ubWnrch9rc_g=w36&quot; style=&quot;max-width: 100%; vertical-align: middle;&quot; width=&quot;18&quot; /&gt;.&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;h2 style=&quot;font-family: &amp;quot;Google Sans&amp;quot;, &amp;quot;Google Sans Text&amp;quot;, Roboto, sans-serif; font-size: 1.5rem; font-weight: 400; letter-spacing: 0rem; line-height: 2rem; margin: 2rem 0px 0.5rem;&quot;&gt;Consultați raportul privind veniturile din Blogger&lt;/h2&gt;&lt;div class=&quot;no-margin&quot; style=&quot;margin: 0px; outline: none;&quot;&gt;&lt;ol style=&quot;margin: 0.25rem 0px 0.75rem; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;li style=&quot;margin: 0.25rem 0px 0.25rem 1.25rem;&quot;&gt;&lt;a href=&quot;https://www.blogger.com/&quot; rel=&quot;noopener&quot; style=&quot;color: #0b57d0; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;Conectați-vă la Blogger&lt;/a&gt;.&lt;/li&gt;&lt;li style=&quot;margin: 0.25rem 0px 0.25rem 1.25rem;&quot;&gt;În stânga sus, alegeți un blog de examinat.&lt;/li&gt;&lt;li style=&quot;margin: 0.25rem 0px 0.25rem 1.25rem;&quot;&gt;În meniul din stânga, dați clic pe&amp;nbsp;&lt;span style=&quot;font-weight: 600;&quot;&gt;Venituri&lt;/span&gt;&amp;nbsp;&lt;img alt=&quot;apoi&quot; data-alt-src=&quot;//lh3.googleusercontent.com/ZiUAiqzGoaoPRl1T622RzBnRHgKFK_haELM4pBc7a2st4UOxtebRb5p_JyaudIB4wP0&quot; data-mime-type=&quot;image/png&quot; height=&quot;18&quot; src=&quot;https://lh3.googleusercontent.com/ZiUAiqzGoaoPRl1T622RzBnRHgKFK_haELM4pBc7a2st4UOxtebRb5p_JyaudIB4wP0=w36-h36&quot; style=&quot;max-width: 100%; vertical-align: middle;&quot; width=&quot;18&quot; /&gt;&amp;nbsp;&lt;span style=&quot;font-weight: 600;&quot;&gt;Vedeți veniturile&lt;/span&gt;.&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;p style=&quot;margin: 0.25rem 0px 0.75rem;&quot;&gt;&lt;span style=&quot;font-weight: 600;&quot;&gt;Sfat&lt;/span&gt;: pentru a afla ce înseamnă fiecare termen din raport, folosiți&amp;nbsp;&lt;a href=&quot;https://support.google.com/adsense/topic/19363&quot; rel=&quot;noopener&quot; style=&quot;color: #0b57d0; text-decoration-line: none;&quot;&gt;glosarul AdSense&lt;/a&gt;.&lt;/p&gt;&lt;h2 style=&quot;font-family: &amp;quot;Google Sans&amp;quot;, &amp;quot;Google Sans Text&amp;quot;, Roboto, sans-serif; font-size: 1.5rem; font-weight: 400; letter-spacing: 0rem; line-height: 2rem; margin: 2rem 0px 0.5rem;&quot;&gt;Ce trebuie să faceți dacă AdSense nu se activează&lt;/h2&gt;&lt;div class=&quot;no-margin&quot; style=&quot;margin: 0px; outline: none;&quot;&gt;&lt;p style=&quot;margin: 0.25rem 0px 0.75rem;&quot;&gt;&lt;span style=&quot;font-weight: 600;&quot;&gt;Important&lt;/span&gt;: pentru a verifica dacă respectivul cont este încă activ, accesați&amp;nbsp;&lt;a href=&quot;https://www.google.com/adsense/start/&quot; rel=&quot;noopener&quot; style=&quot;color: #0b57d0; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;AdSense&lt;/a&gt;.&lt;/p&gt;&lt;ol style=&quot;margin: 0.25rem 0px 0.75rem; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;li style=&quot;margin: 0.25rem 0px 0.25rem 1.25rem;&quot;&gt;&lt;a href=&quot;https://www.blogger.com/&quot; rel=&quot;noopener&quot; style=&quot;color: #0b57d0; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;Conectați-vă la Blogger&lt;/a&gt;.&lt;/li&gt;&lt;li style=&quot;margin: 0.25rem 0px 0.25rem 1.25rem;&quot;&gt;În stânga sus, selectați un blog.&lt;/li&gt;&lt;li style=&quot;margin: 0.25rem 0px 0.25rem 1.25rem;&quot;&gt;În meniul din stânga, dați clic pe&amp;nbsp;&lt;span style=&quot;font-weight: 600;&quot;&gt;Aspect&lt;/span&gt;.&lt;/li&gt;&lt;li style=&quot;margin: 0.25rem 0px 0.25rem 1.25rem;&quot;&gt;În gadgetul AdSense, dați clic pe&amp;nbsp;&lt;span style=&quot;font-weight: 600;&quot;&gt;Modificați&amp;nbsp;&lt;/span&gt;&lt;img alt=&quot;apoi&quot; data-alt-src=&quot;//lh3.googleusercontent.com/ZiUAiqzGoaoPRl1T622RzBnRHgKFK_haELM4pBc7a2st4UOxtebRb5p_JyaudIB4wP0&quot; data-mime-type=&quot;image/png&quot; height=&quot;18&quot; src=&quot;https://lh3.googleusercontent.com/ZiUAiqzGoaoPRl1T622RzBnRHgKFK_haELM4pBc7a2st4UOxtebRb5p_JyaudIB4wP0=w36-h36&quot; style=&quot;max-width: 100%; vertical-align: middle;&quot; width=&quot;18&quot; /&gt;&amp;nbsp;&lt;span style=&quot;font-weight: 600;&quot;&gt;Salvați&lt;/span&gt;.&lt;/li&gt;&lt;li style=&quot;margin: 0.25rem 0px 0.25rem 1.25rem;&quot;&gt;Repetați pasul 4&amp;nbsp;pentru fiecare gadget AdSense de pe blog.&lt;/li&gt;&lt;li style=&quot;margin: 0.25rem 0px 0.25rem 1.25rem;&quot;&gt;&lt;span id=&quot;98182S&quot;&gt;&lt;/span&gt;În partea de jos a gadgetului „Postări pe blog”, dați clic pe&amp;nbsp;&lt;span style=&quot;font-weight: 600;&quot;&gt;Modificați&lt;/span&gt;&lt;img alt=&quot;apoi&quot; data-alt-src=&quot;//lh3.googleusercontent.com/ZiUAiqzGoaoPRl1T622RzBnRHgKFK_haELM4pBc7a2st4UOxtebRb5p_JyaudIB4wP0&quot; data-mime-type=&quot;image/png&quot; height=&quot;18&quot; src=&quot;https://lh3.googleusercontent.com/ZiUAiqzGoaoPRl1T622RzBnRHgKFK_haELM4pBc7a2st4UOxtebRb5p_JyaudIB4wP0=w36-h36&quot; style=&quot;max-width: 100%; vertical-align: middle;&quot; width=&quot;18&quot; /&gt;&amp;nbsp;&lt;span style=&quot;font-weight: 600;&quot;&gt;Salvați&lt;/span&gt;.&lt;/li&gt;&lt;li style=&quot;margin: 0.25rem 0px 0.25rem 1.25rem;&quot;&gt;Pentru a salva setările, în dreapta jos, dați clic pe Salvați&amp;nbsp;&lt;img alt=&quot;Salvați&quot; class=&quot;18&quot; data-alt-src=&quot;//lh3.googleusercontent.com/usFryoZTu18PlYp_N4KLBC4mz_gT4oGHA9zrbiDEKdFVzrGPowvws4ubWnrch9rc_g&quot; data-mime-type=&quot;image/png&quot; src=&quot;https://lh3.googleusercontent.com/usFryoZTu18PlYp_N4KLBC4mz_gT4oGHA9zrbiDEKdFVzrGPowvws4ubWnrch9rc_g=w36&quot; style=&quot;max-width: 100%; vertical-align: middle;&quot; width=&quot;18&quot; /&gt;&lt;span id=&quot;97603E&quot;&gt;.&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;h2 style=&quot;font-family: &amp;quot;Google Sans&amp;quot;, &amp;quot;Google Sans Text&amp;quot;, Roboto, sans-serif; font-size: 1.5rem; font-weight: 400; letter-spacing: 0rem; line-height: 2rem; margin: 2rem 0px 0.5rem;&quot;&gt;&lt;a name=&quot;adstxt&quot;&gt;&lt;/a&gt;Configurați un fișier ads.txt&lt;/h2&gt;&lt;div style=&quot;margin: 0.25rem 0px 0.75rem; outline: none;&quot;&gt;&lt;p style=&quot;margin: 0.25rem 0px 0.75rem;&quot;&gt;Dacă blogul dvs. generează bani prin furnizori terță parte sau ați integrat manual AdSense pe blog,&amp;nbsp;va trebui să configurați manual conținutul fișierului ads.txt.&amp;nbsp;&lt;a href=&quot;https://support.google.com/adsense/answer/7532444&quot; rel=&quot;noopener&quot; style=&quot;color: #0b57d0; text-decoration-line: none;&quot;&gt;Aflați mai multe despre fișierul ads.txt pentru AdSense&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;no-margin&quot; style=&quot;margin: 0px; outline: none;&quot;&gt;&lt;ol style=&quot;margin: 0.25rem 0px 0.75rem; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;li style=&quot;margin: 0.25rem 0px 0.25rem 1.25rem;&quot;&gt;&lt;a href=&quot;https://www.blogger.com/&quot; rel=&quot;noopener&quot; style=&quot;color: #0b57d0; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;Conectați-vă la Blogger&lt;/a&gt;.&lt;/li&gt;&lt;li style=&quot;margin: 0.25rem 0px 0.25rem 1.25rem;&quot;&gt;În stânga sus, alegeți blogul pe care doriți să îl configurați.&lt;/li&gt;&lt;li style=&quot;margin: 0.25rem 0px 0.25rem 1.25rem;&quot;&gt;În meniul din stânga, dați clic pe&amp;nbsp;&lt;span style=&quot;font-weight: 600;&quot;&gt;Setări&lt;/span&gt;.&lt;/li&gt;&lt;li style=&quot;margin: 0.25rem 0px 0.25rem 1.25rem;&quot;&gt;Sub „Generare de bani”, activați&amp;nbsp;&lt;span style=&quot;font-weight: 600;&quot;&gt;Activați fișierul ads.txt personalizat&lt;/span&gt;.&lt;/li&gt;&lt;li style=&quot;margin: 0.25rem 0px 0.25rem 1.25rem;&quot;&gt;Dați clic pe&amp;nbsp;&lt;span style=&quot;font-weight: 600;&quot;&gt;Fișier ads.txt personalizat&lt;/span&gt;.&lt;/li&gt;&lt;li style=&quot;margin: 0.25rem 0px 0.25rem 1.25rem;&quot;&gt;Copiați setările de la furnizorul terță parte pentru generare de bani și inserați-le în caseta de text.&lt;/li&gt;&lt;li style=&quot;margin: 0.25rem 0px 0.25rem 1.25rem;&quot;&gt;Dă clic pe&amp;nbsp;&lt;span style=&quot;font-weight: 600;&quot;&gt;Salvați&lt;/span&gt;.&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div class=&quot;no-margin&quot; style=&quot;margin: 0px; outline: none;&quot;&gt;&lt;span style=&quot;font-weight: 600;&quot;&gt;Sfat&lt;/span&gt;: ca să verificați conținutul fișierului ads.txt, accesați http://&amp;lt;adresa blogului&amp;gt;/ads.txt.&lt;/div&gt;&lt;div class=&quot;no-margin&quot; style=&quot;margin: 0px; outline: none;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;no-margin&quot; style=&quot;margin: 0px; outline: none;&quot;&gt;&lt;a href=&quot;https://support.google.com/blogger/answer/41387?hl=ro&amp;amp;ref_topic=6321959&amp;amp;sjid=12987361364493071784-EU&amp;amp;authuser=0&quot;&gt;Faceți backup sau importați blogul - Blogger Ajutor&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;no-margin&quot; style=&quot;margin: 0px; outline: none;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;no-margin&quot; style=&quot;margin: 0px; outline: none;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;no-margin&quot; style=&quot;margin: 0px; outline: none;&quot;&gt;&amp;nbsp; Clip Călin G&amp;nbsp; &lt;a href=&quot;https://x.com/i/status/1922039658172535163&quot;&gt;https://x.com/i/status/1922039658172535163&lt;/a&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;no-margin&quot; style=&quot;margin: 0px; outline: none;&quot;&gt;&lt;span style=&quot;white-space-collapse: preserve;&quot;&gt;N Dan - Sume enorme de la Primărie în fiecare zi !   &lt;a href=&quot;https://www.facebook.com/reel/1184455306278194&quot;&gt;https://www.facebook.com/reel/1184455306278194&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;no-margin&quot; style=&quot;margin: 0px; outline: none;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;no-margin&quot; style=&quot;margin: 0px; outline: none;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://infotestpc.blogspot.com/feeds/2708504525158188759/comments/default' title='Postare comentarii'/><link rel='replies' type='text/html' href='http://infotestpc.blogspot.com/2025/05/cuvintele-cheie.html#comment-form' title='0 comentarii'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5038728009841547747/posts/default/2708504525158188759'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5038728009841547747/posts/default/2708504525158188759'/><link rel='alternate' type='text/html' href='http://infotestpc.blogspot.com/2025/05/cuvintele-cheie.html' title='Cuvintele Cheie'/><author><name>Al Con</name><uri>http://www.blogger.com/profile/17409243868650327707</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzxhlZwT_oCcAeBxafOyZ0T4Q3UF4GTJsXj1v7kPEwll4vIXil5wpjN80OK3iGrHV56QC6R3WIGs4Axhhmd6dKCWMEcBIgN7RB_ppA4zOvlKfhbPcnz4i0HTak2VWNG6HJSvuEJ4nWAPk1HoiXBx9xJzniQFj70x7muFDwiRLatBS3C0TtkMuixE8R/s72-c/Trotineta.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5038728009841547747.post-1443472297670308002</id><published>2018-01-19T13:32:00.007-08:00</published><updated>2025-01-26T17:22:01.705-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="BAZE DE DATE"/><category scheme="http://www.blogger.com/atom/ns#" term="Calculatorul"/><category scheme="http://www.blogger.com/atom/ns#" term="Initiere"/><category scheme="http://www.blogger.com/atom/ns#" term="Internet"/><category scheme="http://www.blogger.com/atom/ns#" term="Kali &#xa; Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="procesorul"/><category scheme="http://www.blogger.com/atom/ns#" term="programare"/><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><category scheme="http://www.blogger.com/atom/ns#" term="Tv"/><title type='text'>Python , un limbaj accesibil 1</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px; text-align: center;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgN57nICR5fE0TUUQ9e2KJYpGoPIILlDqi6mVUSQf2VZ7CeVa_0DbsD4iXMv1yCVKiaaRGqWN9s0S5s9bAPLewIJNyf82AqkBYfGQbFq8KK_kne3mwCziLRnPbkr-QA0dNagt-4I-0ePA/s526/22279590_1924695991.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;348&quot; data-original-width=&quot;526&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgN57nICR5fE0TUUQ9e2KJYpGoPIILlDqi6mVUSQf2VZ7CeVa_0DbsD4iXMv1yCVKiaaRGqWN9s0S5s9bAPLewIJNyf82AqkBYfGQbFq8KK_kne3mwCziLRnPbkr-QA0dNagt-4I-0ePA/s320/22279590_1924695991.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/h1&gt;&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Tutorialul Python&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/index.html#the-python-tutorial&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div style=&quot;color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Python este un limbaj de programare ușor de învățat.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Are o structură eficientă de date la nivel înalt și o abordare simplă, dar eficientă, a programării orientate pe obiecte.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Sintaxa elegantă și tastarea dinamică a lui Python, împreună cu natura interpretată, o fac o limbă ideală pentru scrierea și dezvoltarea rapidă a aplicațiilor în multe zone pe majoritatea platformelor.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;color: #222222; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Interpretul Python și biblioteca extensivă standard sunt disponibile gratuit în format sursă sau binar pentru toate platformele importante de pe site-ul web Python,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference external&quot; href=&quot;http://www.python.org/&quot; style=&quot;text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;color: #0b5394; vertical-align: inherit;&quot;&gt;http://www.python.org/&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #222222; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, și pot fi distribuite în mod liber.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Același site conține, de asemenea, distribuții și indicatori către multe module, programe și instrumente gratuite Python, precum și documentație suplimentară.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Interpretul Python este ușor de extins cu noi funcții și tipuri de date implementate în C sau C ++ (sau alte limbi care pot fi apelate din C).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Python este, de asemenea, potrivit ca limbaj de extensie pentru aplicații personalizabile.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest tutorial introduce cititorul în mod informal la conceptele și caracteristicile de bază ale limbajului și sistemului Python.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Vă ajută să aveți un interpret Python la îndemână pentru experiența hands-on, dar toate exemplele sunt de sine stătătoare, astfel încât tutorialul poate fi citit și offline.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 22.4px; text-align: justify;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 22.4px; text-align: justify;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Medium -&lt;a href=&quot;https://python.plainenglish.io/unlock-your-future-a-step-by-step-guide-to-the-best-free-coding-resources-in-2025-1639b7c342e4&quot;&gt;Unlock Your Future: A Step-by-Step Guide to the Best Free Coding Resources in 2025 | by Logupradeep | Jan, 2025 | Python in Plain English&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 22.4px; text-align: justify;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; line-height: 22.4px; text-align: justify;&quot;&gt;&lt;a href=&quot;https://www.pizap.com/app/start&quot; style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;piZap - free online photo editor - fun photo effects editor&lt;/span&gt;&lt;/a&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; line-height: 22.4px; text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pentru o descriere a obiectelor și a modulelor standard, consultați&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/index.html#library-index&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Biblioteca standard Python&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/index.html#reference-index&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Referința de limbă Python&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;oferă o definiție mai formală a limbii.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pentru a scrie extensii în C sau C ++, citiți&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/extending/index.html#extending-index&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Extinderea și încorporarea&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/c-api/index.html#c-api-index&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Manualului de referință&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/extending/index.html#extending-index&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Python Interpreter&lt;/span&gt;&lt;/em&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/c-api/index.html#c-api-index&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Python / C API&lt;/span&gt;&lt;/em&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Există, de asemenea, câteva cărți care acoperă în profunzime Python.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest tutorial nu încearcă să fie cuprinzător și acoperă fiecare caracteristică sau chiar orice caracteristică frecvent utilizată.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În schimb, introduceți multe dintre caracteristicile cele mai notabile ale lui Python și vă va oferi o idee bună despre stilul și aroma limbii.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;După ce ați citit-o, veți putea citi și scrie module și programe Python și veți fi gata să aflați mai multe despre diferitele module de bibliotecă Python descrise în&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/index.html#library-index&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;The Python Standard Library&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/glossary.html#glossary&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Glosarul&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este merită să fie&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;parcurse.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;toctree-wrapper compound&quot; style=&quot;color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 16px;&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;toctree-l1&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/appetite.html&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;1. Îngăduiți-vă apetitul&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l1&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/interpreter.html&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;2. Folosind interpretul Python&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;ul&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/interpreter.html#invoking-the-interpreter&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;2.1.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Invocând interpretul&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;ul&gt;
&lt;li class=&quot;toctree-l3&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/interpreter.html#argument-passing&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;2.1.1.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Argumentul care trece&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l3&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/interpreter.html#interactive-mode&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;2.1.2.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Mod interactiv&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/interpreter.html#the-interpreter-and-its-environment&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;2.2.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Interpretul și mediul său&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;ul&gt;
&lt;li class=&quot;toctree-l3&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/interpreter.html#error-handling&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;2.2.1.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Eroare de manipulare&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l3&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/interpreter.html#executable-python-scripts&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;2.2.2.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Script-uri Python executabile&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l3&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/interpreter.html#source-code-encoding&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;2.2.3.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Codificarea codului sursă&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l3&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/interpreter.html#the-interactive-startup-file&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;2.2.4.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Fișierul de pornire interactivă&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l3&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/interpreter.html#the-customization-modules&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;2.2.5.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Modulele de personalizare&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li class=&quot;toctree-l1&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/introduction.html&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;3. O introducere informală în Python&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;ul&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/introduction.html#using-python-as-a-calculator&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;3.1.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Utilizarea Python ca Calculator&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;ul&gt;
&lt;li class=&quot;toctree-l3&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/introduction.html#numbers&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;3.1.1.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;numere&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l3&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/introduction.html#strings&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;3.1.2.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Siruri de caractere&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l3&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/introduction.html#lists&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;3.1.3.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;liste&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/introduction.html#first-steps-towards-programming&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;3.2.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Primii pași spre programare&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li class=&quot;toctree-l1&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/controlflow.html&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;4. Mai multe instrumente de control al fluxului&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;ul&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/controlflow.html#if-statements&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;4.1.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;dacă&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;declarațiile&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/controlflow.html#for-statements&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;4.2.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pentru&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;declarații&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/controlflow.html#the-range-function&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;4.3.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Intervalul ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;Funcția&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/controlflow.html#break-and-continue-statements-and-else-clauses-on-loops&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;4.4.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;întrerupeți&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;continuați&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;declarațiile, și&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;altfel&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;clauzele pe buclă&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/controlflow.html#pass-statements&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;4.5.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;trece&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;declarațiile&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/controlflow.html#defining-functions&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;4.6.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Definirea funcțiilor&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/controlflow.html#more-on-defining-functions&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;4.7.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Mai multe despre definirea funcțiilor&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;ul&gt;
&lt;li class=&quot;toctree-l3&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/controlflow.html#default-argument-values&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;4.7.1.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Valori implicite ale argumentelor&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l3&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/controlflow.html#keyword-arguments&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;4.7.2.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Argumente pentru cuvinte cheie&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l3&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/controlflow.html#arbitrary-argument-lists&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;4.7.3.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Liste de argumente arbitrare&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l3&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/controlflow.html#unpacking-argument-lists&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;4.7.4.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Despachetarea listelor de argumente&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l3&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/controlflow.html#lambda-expressions&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;4.7.5.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Expresii Lambda&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l3&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/controlflow.html#documentation-strings&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;4.7.6.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Structuri de documentare&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l3&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/controlflow.html#function-annotations&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;4.7.7.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Funcții adnotări&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/controlflow.html#intermezzo-coding-style&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;4.8.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Intermezzo: Stilul de codificare&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li class=&quot;toctree-l1&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/datastructures.html&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;5. Structuri de date&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;ul&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/datastructures.html#more-on-lists&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;5.1.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Mai multe despre Liste&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;ul&gt;
&lt;li class=&quot;toctree-l3&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/datastructures.html#using-lists-as-stacks&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;5.1.1.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Utilizarea listelor ca stive&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l3&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/datastructures.html#using-lists-as-queues&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;5.1.2.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Utilizarea listelor ca cozi&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l3&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/datastructures.html#list-comprehensions&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;5.1.3.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Lista de înțelegeri&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l3&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/datastructures.html#nested-list-comprehensions&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;5.1.4.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Cuprinsul listei încorporate&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/datastructures.html#the-del-statement&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;5.2.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Del&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;Declarația&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/datastructures.html#tuples-and-sequences&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;5.3.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Tupele și secvențe&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/datastructures.html#sets&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;5.4.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;seturi&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/datastructures.html#dictionaries&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;5.5.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;dicţionare&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/datastructures.html#looping-techniques&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;5.6.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Tehnici de buclă&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/datastructures.html#more-on-conditions&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;5.7.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Mai multe despre Condiții&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/datastructures.html#comparing-sequences-and-other-types&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;5.8.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Comparând secvențele și alte tipuri&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li class=&quot;toctree-l1&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/modules.html&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;6. Module&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;ul&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/modules.html#more-on-modules&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;6.1.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Mai multe despre module&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;ul&gt;
&lt;li class=&quot;toctree-l3&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/modules.html#executing-modules-as-scripts&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;6.1.1.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Executarea modulelor ca scripturi&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l3&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/modules.html#the-module-search-path&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;6.1.2.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Calea căutării modulelor&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l3&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/modules.html#compiled-python-files&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;6.1.3.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&quot;Compilate&quot; fișierele Python&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/modules.html#standard-modules&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;6.2.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Module standard&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/modules.html#the-dir-function&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;6.3.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dir ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;Funcția&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/modules.html#packages&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;6.4.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pachete&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;ul&gt;
&lt;li class=&quot;toctree-l3&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/modules.html#importing-from-a-package&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;6.4.1.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Importul * dintr-un pachet&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l3&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/modules.html#intra-package-references&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;6.4.2.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Intrările în pachet&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l3&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/modules.html#packages-in-multiple-directories&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;6.4.3.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pachete în mai multe directoare&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li class=&quot;toctree-l1&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/inputoutput.html&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;7. Intrare și ieșire&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;ul&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/inputoutput.html#fancier-output-formatting&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;7.1.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Formatul ieșirii fancierului&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;ul&gt;
&lt;li class=&quot;toctree-l3&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/inputoutput.html#old-string-formatting&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;7.1.1.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Formatul de șir vechi&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/inputoutput.html#reading-and-writing-files&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;7.2.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Citirea și scrierea fișierelor&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;ul&gt;
&lt;li class=&quot;toctree-l3&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/inputoutput.html#methods-of-file-objects&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;7.2.1.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Metode de obiecte de fișiere&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l3&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/inputoutput.html#saving-structured-data-with-json&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;7.2.2.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Salvarea datelor structurate cu&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;json&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li class=&quot;toctree-l1&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/errors.html&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;8. Erori și excepții&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;ul&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/errors.html#syntax-errors&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;8.1.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Sintaxă Erori&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/errors.html#exceptions&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;8.2.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;excepţii&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/errors.html#handling-exceptions&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;8.3.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Manipularea excepțiilor&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/errors.html#raising-exceptions&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;8.4.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Ridicarea excepțiilor&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/errors.html#user-defined-exceptions&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;8.5.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Excepții definite de utilizator&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/errors.html#defining-clean-up-actions&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;8.6.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Definirea acțiunilor de curățare&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/errors.html#predefined-clean-up-actions&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;8.7.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acțiuni de curățare predefinite&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li class=&quot;toctree-l1&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;9. Clase&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;ul&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#a-word-about-names-and-objects&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;9.1.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Un cuvânt despre nume și obiecte&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#python-scopes-and-namespaces&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;9.2.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Python Scopes și Namespaces&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;ul&gt;
&lt;li class=&quot;toctree-l3&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#scopes-and-namespaces-example&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;9.2.1.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Scopes și Namespaces Exemplu&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#a-first-look-at-classes&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;9.3.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;O primă privire la clase&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;ul&gt;
&lt;li class=&quot;toctree-l3&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#class-definition-syntax&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;9.3.1.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Sintaxa de definire a clasei&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l3&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#class-objects&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;9.3.2.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Obiecte de clasă&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l3&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#instance-objects&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;9.3.3.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Obiectele instanței&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l3&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#method-objects&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;9.3.4.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Obiectele obiectului&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#random-remarks&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;9.4.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Comentarii aleatorii&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#inheritance&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;9.5.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Moştenire&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;ul&gt;
&lt;li class=&quot;toctree-l3&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#multiple-inheritance&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;9.5.1.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Moștenire multiplă&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#private-variables&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;9.6.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Variabile private&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#odds-and-ends&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;9.7.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Mărunţişuri&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#exceptions-are-classes-too&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;9.8.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Excepțiile sunt prea clare&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#iterators&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;9.9.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;iteratori&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#generators&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;9.10.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;generatoare&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#generator-expressions&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;9.11.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Expresii generatoare&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li class=&quot;toctree-l1&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/stdlib.html&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;10. Scurt tur al Bibliotecii Standard&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;ul&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/stdlib.html#operating-system-interface&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;10.1.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Interfața sistemului de operare&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/stdlib.html#file-wildcards&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;10.2.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Fișiere Wildcards&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/stdlib.html#command-line-arguments&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;10.3.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Argumentele liniei de comandă&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/stdlib.html#error-output-redirection-and-program-termination&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;10.4.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Eroare de redirecționare a erorilor și terminare program&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/stdlib.html#string-pattern-matching&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;10.5.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;String Matching Pattern&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/stdlib.html#mathematics&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;10.6.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Matematică&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/stdlib.html#internet-access&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;10.7.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acces la internet&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/stdlib.html#dates-and-times&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;10.8.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Datele și orele&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/stdlib.html#data-compression&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;10.9.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Comprimarea datelor&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/stdlib.html#performance-measurement&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;10.10.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Măsurarea performanței&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/stdlib.html#quality-control&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;10.11.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Control de calitate&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/stdlib.html#batteries-included&quot; style=&quot;color: #00b0e4;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;10.12.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Baterii incluse&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li class=&quot;toctree-l1&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/stdlib2.html&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;11. Scurt tur al Bibliotecii Standard - Partea a II-a&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;ul&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/stdlib2.html#output-formatting&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;11.1.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Formatul de ieșire&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/stdlib2.html#templating&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;11.2.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;templating&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/stdlib2.html#working-with-binary-data-record-layouts&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;11.3.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Lucrul cu layout-urile de înregistrare a datelor binare&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/stdlib2.html#multi-threading&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;11.4.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Multi-threading&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/stdlib2.html#logging&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;11.5.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Logging&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/stdlib2.html#weak-references&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;11.6.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Referințe slabe&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/stdlib2.html#tools-for-working-with-lists&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;11.7.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Instrumente pentru lucrul cu liste&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/stdlib2.html#decimal-floating-point-arithmetic&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;11.8.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Zecimal de plutire punct aritmetică&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li class=&quot;toctree-l1&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/whatnow.html&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;12. Ce anume?&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l1&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/interactive.html&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;13. Editarea interactivă de intrare și înlocuirea istoricului&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;ul&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/interactive.html#line-editing&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;13.1.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Editare rând&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/interactive.html#history-substitution&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;13.2.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Înlocuirea istoriei&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/interactive.html#key-bindings&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;13.3.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Legarea cheilor&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/interactive.html#alternatives-to-the-interactive-interpreter&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;13.4.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Alternative la interpretul interactiv&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li class=&quot;toctree-l1&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/floatingpoint.html&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;14. Aritmetica punctului plutitor: probleme și limitări&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;ul&gt;
&lt;li class=&quot;toctree-l2&quot; style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/floatingpoint.html#representation-error&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;14.1.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Eroare de reprezentare&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/h1&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h1&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;1. Întâlniți-vă apetitul&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/appetite.html#whetting-your-appetite&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div style=&quot;color: #222222; font-size: 16px; line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă lucrați mult pe computere, în cele din urmă veți găsi că există o sarcină pe care doriți să o automatizați.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu, puteți să căutați și să înlocuiți un număr mare de fișiere text sau să redenumiți și să rearanjați o grămadă de fișiere foto într-un mod complicat.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Poate doriți să scrieți o bază de date particularizată sau o aplicație GUI specializată sau un joc simplu.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #222222; font-size: 16px; line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă sunteți un dezvoltator profesionist de software, este posibil să trebuiască să lucrați cu mai multe biblioteci C / C ++ / Java, dar găsiți că ciclul de scriere / compilare / testare / recalculare obișnuit este prea lent.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Poate că scrieți o suită de testare pentru o astfel de bibliotecă și găsiți scrierea codului de testare o sarcină plictisitoare.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Sau poate ați scris un program care ar putea folosi un limbaj de extensie și nu doriți să proiectați și să implementați o limbă cu totul nouă pentru aplicația dvs.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #222222; font-size: 16px; line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Python este doar limba pentru tine.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #222222; font-size: 16px; line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Aveți posibilitatea să scrieți un script shell Unix sau fișiere batch Windows pentru unele dintre aceste sarcini, dar scripturile shell sunt cele mai bune la deplasarea în jurul fișierelor și schimbarea datelor de text, care nu sunt potrivite pentru aplicațiile sau jocurile GUI.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;S-ar putea să scrieți un program C / C ++ / Java, dar poate dura mult timp pentru a obține chiar și un program de prim plan.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Python este mai simplu de utilizat, disponibil pe sistemele de operare Windows, Mac OS X și Unix, și vă va ajuta să vă ocupați mai repede.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #222222; font-size: 16px; line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Python este ușor de folosit, dar este un limbaj de programare real, oferind mult mai multă structură și suport pentru programe mari decât cele oferite de fișierele de tip shell sau de fișierele batch.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pe de altă parte, Python oferă și o verificare a erorilor mult mai mult decât C și, fiind un&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;limbaj foarte înalt&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, are în componență tipuri de date de nivel înalt, cum ar fi matrice și dictionare flexibile.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Datorită tipurilor de date mai generale, Python este aplicabil unui domeniu de probleme mult mai mare decât Awk sau chiar Perl, dar multe lucruri sunt cel puțin la fel de ușor în Python ca și în acele limbi.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #222222; font-size: 16px; line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Python vă permite să vă împărțiți programul în module care pot fi reutilizate în alte programe Python.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acesta vine cu o mare colecție de module standard pe care le puteți utiliza ca bază a programelor dvs. - sau ca exemple pentru a începe să învățați să programați în Python.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Unele dintre aceste module oferă lucruri cum ar fi fișiere I / O, apeluri de sistem, prize și chiar interfețe cu seturi de instrumente de interfață grafică utilizator cum ar fi Tk.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #222222; font-size: 16px; line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Python este un limbaj interpretat, care vă poate economisi timp considerabil în timpul dezvoltării programului, deoarece nu este necesară compilarea și legarea.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Interpretul poate fi folosit interactiv, ceea ce face ușor să experimentați cu caracteristici ale limbii, să scrieți programe de aruncare sau să testați funcțiile în timpul dezvoltării programelor de jos în sus.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Este, de asemenea, un calculator de birou la îndemână.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #222222; font-size: 16px; line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Python permite programelor să fie redactate în mod compact și ușor de citit.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Programele scrise în Python sunt de obicei mult mai scurte decât programele C, C ++ sau Java echivalente, din mai multe motive:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;ul class=&quot;simple&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;li style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;tipurile de date la nivel înalt vă permit să exprimați operații complexe într-o singură declarație;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;declarația de grupare se face prin indentare în loc de paranteze începând și terminând;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;nu sunt necesare declarații variabile sau argumente.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;color: #222222; font-size: 16px; line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Python este&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;extensibil&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;: dacă știți cum să programați în C, este ușor să adăugați o nouă funcție sau un modul încorporat interpretului, fie pentru a efectua operații critice la viteză maximă, fie pentru a conecta programele Python la biblioteci care pot fi disponibile numai în formă binară (cum ar fi o bibliotecă grafică specifică vânzătorului).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Odată ce sunteți cu adevărat cuplat, puteți conecta interpretul Python într-o aplicație scrisă în C și să o utilizați ca extensie sau limbaj de comandă pentru acea aplicație.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #222222; font-size: 16px; line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Apropo, limba este numită după emisiunea BBC &quot;Monty Python&#39;s Circus Flying&quot; și nu are nimic de-a face cu reptilele.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Efectuarea de referințe la schițele Monty Python în documentație nu este permisă, este încurajată!&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #222222; font-size: 16px; line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acum că sunteți entuziasmați de Python, veți dori să o examinați mai detaliat.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Deoarece cea mai bună metodă de a învăța o limbă este să o folosești, tutorialul te invită să te joci cu interpretul Python pe măsură ce citești.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #222222; font-size: 16px; line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În capitolul următor sunt explicate mecanismele de utilizare a interpretului.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Aceasta este o informație destul de luminoasă, dar esențială pentru a încerca exemplele prezentate mai târziu.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #222222; font-size: 16px; line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Restul tutorialului introduce diferite exemple de limbaj și sistem Python prin exemple, începând cu expresii simple, instrucțiuni și tipuri de date, prin funcții și module și atingând în cele din urmă concepte avansate precum excepțiile și clasele definite de utilizator.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #222222; font-size: 16px; line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;2. Folosirea Interpretului Python&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/interpreter.html#using-the-python-interpreter&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 25.6px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;2.1.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Invocarea interpretului&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/interpreter.html#invoking-the-interpreter&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; id=&quot;invoking-the-interpreter&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;span id=&quot;tut-invoking&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Interpretul Python este de obicei instalat ca&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;file docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;/usr/local/bin/python3.3&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;pe acele mașini în care este disponibil;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;punerea&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;file docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;/ usr / local / bin&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;în calea de căutare a shell-ului Unix vă permite să o porniți tastând comanda:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-text&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;python3.3
&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;la coajă.&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;footnote-reference&quot; href=&quot;https://docs.python.org/3.3/tutorial/interpreter.html#id3&quot; id=&quot;id1&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;[1]&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;Deoarece alegerea directorului în care trăiește interpretul este o opțiune de instalare, sunt posibile și alte locuri;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;consultați-vă cu guru-ul local Python sau cu administratorul de sistem.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;(De exemplu,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;file docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;/ usr / local / python&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este o locație alternativă populară.)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pe mașinile Windows, instalarea Python este, de obicei, plasată în&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;file docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;C: \ Python33&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, deși puteți schimba acest lucru când executați programul de instalare.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pentru a adăuga acest director în calea dvs., puteți introduce următoarea comandă în linia de comandă într-o casetă DOS:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;set &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;path &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;=% &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;path &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;% &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;C &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt; \ &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;python33&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Tastarea unui caracter de sfârșit de fișier (&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;kbd docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Control-D&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;pe Unix,&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;kbd docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Control-Z&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;pe Windows) la promptul principal determină ieșirea interpretului cu o stare de ieșire zero.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă aceasta nu funcționează, puteți ieși din interpret tastând următoarea comandă:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;quit ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Funcțiile de editare a traducerilor de obicei nu sunt foarte sofisticate.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pe Unix, oricine a instalat interpretul ar fi permis activarea suportului pentru biblioteca GNU readline, care adaugă funcții de editare interactive și istorie mai elaborate.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Poate că verificarea cea mai rapidă pentru a vedea dacă editarea liniei de comandă este acceptată este tastarea Control-P la primul prompt Python pe care îl primiți.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În cazul în care emite un beep, aveți editarea liniei de comandă;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;consultați Anexă&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/interactive.html#tut-interacting&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em&gt;Modificarea intrărilor interactive și înlocuirea istoricului&lt;/em&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;pentru introducerea cheilor.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă nu se întâmplă nimic sau dacă&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;echivalentul lui ^ P&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;nu este disponibilă editarea liniei de comandă;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;veți putea utiliza doar spațiul de backspace pentru a elimina caracterele din linia curentă.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Interpretul funcționează într-o oarecare măsură ca shell-ul Unix: când este apelat cu intrare standard conectată la un dispozitiv tty, citește și execută comenzi interactiv;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;când este apelat cu un argument de nume de fișier sau cu un fișier ca intrare standard, citește și execută un&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;script&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;din acel fișier.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Un al doilea mod de a porni interpretul este&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;comanda&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;python&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;-c&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;[arg]&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;...&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;, care execută instrucțiunile din&amp;nbsp;&lt;/span&gt;&lt;em&gt;comanda&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, analog cu opțiunea shell&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/using/cmdline.html#cmdoption-c&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em class=&quot;xref std std-option&quot;&gt;-c&lt;/em&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Deoarece declarațiile Python conțin adesea spații sau alte caractere care sunt speciale pentru shell, este de obicei recomandat să citezi&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;comanda&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;în întregime cu ghilimele simple.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Unele module Python sunt, de asemenea, utile ca scripturi.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acestea pot fi invocate folosind&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;modulul&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;python&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;-m&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;[arg]&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;...&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;, care execută fișierul sursă pentru&amp;nbsp;&lt;/span&gt;&lt;em&gt;modul&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;ca și cum l-ați scrise numele complet pe linia de comandă.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Atunci când se utilizează un fișier de script, uneori este util să puteți rula scriptul și apoi să intrați în modul interactiv.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest lucru se poate face trecând&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/using/cmdline.html#cmdoption-i&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em class=&quot;xref std std-option&quot;&gt;-i&lt;/em&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;înainte de scenariu.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;
&lt;h3 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 22.4px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;2.1.1.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Argumentul de trecere&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/interpreter.html#argument-passing&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;div class=&quot;section&quot; id=&quot;argument-passing&quot;&gt;
&lt;span id=&quot;tut-argpassing&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Când este cunoscut interpretului, numele script-ului și argumentele suplimentare ulterior sunt transformate într-o listă de șiruri și atribuite&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;variabilei&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;argv&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;în&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;modulul&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sys&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Puteți accesa această listă executând&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sys&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;import&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Lungimea listei este cel puțin una;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;când nici un script și nici un argument nu sunt date,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sys.argv [0]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este un șir gol.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Când numele script-ului este dat ca&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&#39;-&#39;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;(adică input standard),&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sys.argv [0]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este setat la&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&#39;-&#39;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Când&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;se utilizează&amp;nbsp;&lt;/span&gt;&lt;em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;comanda&amp;nbsp;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/using/cmdline.html#cmdoption-c&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em class=&quot;xref std std-option&quot;&gt;-c&lt;/em&gt;&lt;/a&gt;&amp;nbsp;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sys.argv [0]&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este setat la&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&quot;-c&quot;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Când&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;se utilizează&amp;nbsp;&lt;/span&gt;&lt;em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;modulul&amp;nbsp;&lt;/span&gt;&lt;/em&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/using/cmdline.html#cmdoption-m&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em class=&quot;xref std std-option&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;-m&lt;/span&gt;&lt;/em&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;,&lt;/span&gt;&lt;/span&gt;&lt;em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/using/cmdline.html#cmdoption-m&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em class=&quot;xref std std-option&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/em&gt;&lt;/a&gt;&amp;nbsp;&lt;em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sys.argv [0]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este setată la numele complet al modulului localizat.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Opțiuni găsite după&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/using/cmdline.html#cmdoption-c&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em class=&quot;xref std std-option&quot;&gt;-c&lt;/em&gt;&lt;/a&gt;&amp;nbsp;&lt;em&gt;comanda&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;sau&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/using/cmdline.html#cmdoption-m&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em class=&quot;xref std std-option&quot;&gt;&amp;nbsp;-m&lt;/em&gt;&lt;/a&gt;&amp;nbsp;&lt;em&gt;modulul&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;nu sunt consumate de procesare opțiunea interpretului Python, dar&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;plecat în&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;sys.argv&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;pentru comanda sau modulul să&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;ocupe.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;
&lt;h3 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 22.4px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;2.1.2.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Modul Interactiv&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/interpreter.html#interactive-mode&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;div class=&quot;section&quot; id=&quot;interactive-mode&quot;&gt;
&lt;span id=&quot;tut-interactive&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Când comenzile sunt citite de la un tty, interpretul se spune că este în&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;modul interactiv&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În acest mod, se solicită următoarea comandă cu&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;promptul principal&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, de obicei trei semne mai mari decât cele (&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;);&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pentru linii de continuare se solicită cu&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;prompt secundar&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, implicit trei puncte (&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;...&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Interpretul tipărește un mesaj de întâmpinare care precizează numărul versiunii și o notă privind drepturile de autor înainte de a imprima primul prompt:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot;&gt;
&lt;pre style=&quot;background-color: #eeffcc; border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;$ python3.3&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
Python 3.3 (implicit, 24 septembrie 2012, 09:25:04)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
[GCC 4.6.3] pe linux2&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
Introduceți &quot;ajutor&quot;, &quot;drepturi de autor&quot;, &quot;credite&quot; sau &quot;licență&quot; pentru mai multe informații.&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Liniile de continuitate sunt necesare atunci când intri într-un construct multi-linie.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu, aruncați o privire la această&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;declarație&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#if&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;if&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;the_world_is_flat &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;= &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;1 &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;dacă &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;the_world_is_flat &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;: &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;... &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;print &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;( &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&quot;Aveți grijă să nu cădeți!&quot; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;) &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;... &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Aveți grijă să nu cădeți!&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;color: #222222; font-size: 16px; line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 25.6px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;2.2.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Traducătoarea și a&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;mediului său&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/interpreter.html#the-interpreter-and-its-environment&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;h3 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 22.4px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;2.2.1.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Efectuarea erorilor&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/interpreter.html#error-handling&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; id=&quot;the-interpreter-and-its-environment&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;span id=&quot;tut-interp&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;section&quot; id=&quot;error-handling&quot;&gt;
&lt;span id=&quot;tut-error&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Când apare o eroare, interpretul imprimă un mesaj de eroare și o urmă de stivă.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În modul interactiv, acesta revine la promptul principal;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;când intrarea a provenit de la un fișier, acesta iese după o stare de ieșire nonzero după imprimarea urmelor stivei.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;(Excepții manipulate de o , cu&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#except&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;excepția&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;clauză într -&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;o&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#try&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;încercare&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;declarație nu sunt erori în acest context.) Unele erori sunt în&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;mod necondiționat fatale și pot provoca o ieșire cu o ieșire nenul;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;acest lucru se aplică în cazul inconsecvențelor interne și al unor cazuri de epuizare a memoriei.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Toate mesajele de eroare sunt scrise în fluxul de eroare standard;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;ieșirea normală din comenzile executate este scrisă la ieșirea standard.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Tastarea caracterului de întrerupere (de obicei Control-C sau DEL) la solicitarea primară sau secundară anulează intrarea și revine la promptul principal.&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;footnote-reference&quot; href=&quot;https://docs.python.org/3.3/tutorial/interpreter.html#id4&quot; id=&quot;id2&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;[2]&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;Tastarea unei întreruperi în timp ce o comandă este executată ridică&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;excepția&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/exceptions.html#KeyboardInterrupt&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;KeyboardInterrupt&quot;&gt;&lt;tt class=&quot;xref py py-exc docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;KeyboardInterrupt&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, care poate fi tratată printr-o&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;instrucțiune&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#try&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;try&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;
&lt;h3 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 22.4px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;2.2.2.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Șabloane de execuție Python&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/interpreter.html#executable-python-scripts&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;div class=&quot;section&quot; id=&quot;executable-python-scripts&quot;&gt;
&lt;span id=&quot;tut-scripts&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pe sistemele Unix BSD, script-urile Python pot fi făcute direct executabile, cum ar fi scripturile shell, prin plasarea liniei&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;#! &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;/ usr / bin / env python3.3&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;(presupunând că interpretul se află pe ecranul utilizatorului&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;target&quot; id=&quot;index-0&quot;&gt;&lt;/span&gt;&lt;tt class=&quot;xref std std-envvar docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;PATH&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;) la începutul scriptului și oferind fișierului un mod executabil.&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;#!&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;trebuie să fie primele două caractere ale fișierului.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pe unele platforme, această primă linie trebuie să se încheie cu o linie de tip Unix care se termină (&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;&#39;\ n&#39;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;), nu&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;cu o linie&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Windows (&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;&#39;\ r \ n&#39;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;) care se termină.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Rețineți că hash, sau literă, caracter,&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;&quot;#&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, este folosit pentru a începe un comentariu în Python.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Scriptul poate primi un mod executabil sau permisiune, folosind&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;comanda&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;strong class=&quot;program&quot;&gt;chmod&lt;/strong&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot;&gt;
&lt;pre style=&quot;background-color: #eeffcc; border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;$ chmod + x myscript.py&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pe sistemele Windows, nu există nicio noțiune de &quot;mod executabil&quot;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Programul de instalare Python asociază automat&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;fișierele&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;.py&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;cu&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Python.exe,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;astfel încât un dublu-clic pe un fișier Python îl va executa ca un script.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Extensia poate fi, de asemenea&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;.pyw&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, în acest caz, fereastra consolei care apare în mod normal este suprimată.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;
&lt;h3 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 22.4px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;2.2.3.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Codificarea codului sursă&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/interpreter.html#source-code-encoding&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;div class=&quot;section&quot; id=&quot;source-code-encoding&quot;&gt;
&lt;span id=&quot;tut-source-encoding&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În mod implicit, fișierele sursă Python sunt tratate ca fiind codificate în UTF-8.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În această codificare, caracterele celor mai multe limbi din lume pot fi utilizate simultan în literali de șir, identificatori și comentarii - deși biblioteca standard utilizează numai caractere ASCII pentru identificatori, o convenție pe care trebuie să o urmeze orice cod portabil.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pentru a afișa corect toate aceste caractere, editorul dvs. trebuie să recunoască faptul că fișierul este UTF-8 și trebuie să utilizeze un font care să accepte toate caracterele din fișier.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De asemenea, este posibil să specificați o codificare diferită pentru fișierele sursă.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pentru a face acest lucru, puneți încă o linie de comentariu specială imediat după&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;#!&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;line pentru a defini codificarea fișierului sursă:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# - * - codare: codare - * -&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Cu această declarație, totul din fișierul sursă va fi tratat ca având codificarea&amp;nbsp;&lt;/span&gt;&lt;em&gt;codării&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;în loc de UTF-8.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Lista codificărilor posibile poate fi găsită în Python Library Reference, în secțiunea despre&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/codecs.html#module-codecs&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;codecuri: codificați și decodificați datele și fluxurile.&quot;&gt;&lt;tt class=&quot;xref py py-mod docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;codecuri&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu, dacă editorul ales nu suportă fișiere codate UTF-8 și insistă să utilizeze alte codări, de exemplu Windows-1252, puteți scrie:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# - * - codare: cp-1252 - * -&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;și încă utilizați toate caracterele din setul de caractere Windows-1252 din fișierele sursă.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Comentariul special de codificare trebuie să fie în&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;prima sau a doua&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;linie din fișier.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;
&lt;h3 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 22.4px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;2.2.4.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Fișierul de pornire interactivă&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/interpreter.html#the-interactive-startup-file&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;div class=&quot;section&quot; id=&quot;the-interactive-startup-file&quot;&gt;
&lt;span id=&quot;tut-startup&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Atunci când utilizați Python interactiv, este frecvent util să executați comenzi standard de fiecare dată când este pornit interpretul.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Puteți face acest lucru setând o variabilă de mediu numită&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;target&quot; id=&quot;index-1&quot;&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/using/cmdline.html#envvar-PYTHONSTARTUP&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-envvar docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;PYTHONSTARTUP&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;la numele unui fișier care conține comenzile de pornire.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest lucru este similar cu&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;caracteristica&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;file docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;.profile&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;a shell-urilor Unix.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest fișier este citit numai în sesiuni interactive, nu când Python citește comenzi dintr-un script, și nu când&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;file docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;dev / tty&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este dat ca sursă explicită de comenzi (care altfel se comportă ca o sesiune interactivă).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Se execută în același spațiu de nume în care sunt executate comenzi interactive, astfel încât obiectele pe care le definește sau le importă pot fi utilizate fără o calificare în sesiunea interactivă.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De asemenea, puteți modifica instrucțiunile&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sys.ps1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sys.ps2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;în acest fișier.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă doriți să citiți un fișier de pornire suplimentar din directorul curent, puteți să îl programați în fișierul global de pornire utilizând codul de tipul&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;if&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;os.path.isfile (&#39;. Pythonrc.py&#39;):&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;exec (open (&#39; .pythonrc.py &quot;). citiți ())&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă doriți să utilizați fișierul de pornire într-un script, trebuie să faceți acest lucru explicit în script:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;kn&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;import &lt;/span&gt; &lt;span class=&quot;nn&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;os &lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;filename &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;os &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;environ &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;get &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;PYTHONSTARTUP&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;dacă &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;numele fișierului &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;și &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;os &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;calea &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;isFile &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;numele fișierului &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;exec &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;deschis &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;nume de &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;fișier &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;citește &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;())&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;
&lt;h3 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 22.4px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;2.2.5.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Modulele de personalizare&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/interpreter.html#the-customization-modules&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;div class=&quot;section&quot; id=&quot;the-customization-modules&quot;&gt;
&lt;span id=&quot;tut-customize&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Python oferă două cârlige pentru a vă permite să o personalizați:&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;xref py py-mod docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sitecustomize&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;xref py py-mod docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;usercustomize&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pentru a vedea cum funcționează, trebuie mai întâi să găsiți locația directorului pentru pachetele de site-uri pentru utilizatori.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Porniți Python și rulați acest cod:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;kn&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;import &lt;/span&gt; &lt;span class=&quot;nn&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;site - &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;ul &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;site - &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;ul &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;getusersitepackages &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;() &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39;/home/user/.local/lib/python3.2/site-packages&#39;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acum puteți crea un fișier numit&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;file docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;usercustomize.py&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;în acel director și puneți tot ce doriți în el.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Aceasta va afecta fiecare invocare a Python, dacă nu este inițiată cu&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;opțiunea&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/using/cmdline.html#cmdoption-s&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em class=&quot;xref std std-option&quot;&gt;-s&lt;/em&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;pentru a dezactiva importul automat.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;tt class=&quot;xref py py-mod docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sitecustomize&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;funcționează în același mod, dar este, în mod obișnuit, creat de un administrator al calculatorului în directorul global de site-uri cu pachete și este importat înaintea&lt;/span&gt;&lt;tt class=&quot;xref py py-mod docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;usercustomize&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Consultați documentația&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;modulului&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/site.html#module-site&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;site: modulul responsabil pentru configurația specifică site-ului.&quot;&gt;&lt;tt class=&quot;xref py py-mod docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;site&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;pentru mai multe detalii.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;rubric&quot; style=&quot;font-weight: bold; line-height: 22.4px; margin-top: 30px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Note de subsol&lt;/span&gt;&lt;/div&gt;
&lt;table class=&quot;docutils footnote&quot; frame=&quot;void&quot; id=&quot;id3&quot; rules=&quot;none&quot; style=&quot;border-collapse: collapse; border-radius: 3px; border: 0px; margin-bottom: 10px; margin-top: 10px; min-width: 20%;&quot;&gt;&lt;colgroup&gt;&lt;col class=&quot;label&quot;&gt;&lt;/col&gt;&lt;col&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;tbody valign=&quot;top&quot;&gt;
&lt;tr&gt;&lt;td class=&quot;label&quot; style=&quot;border-radius: 3px; border: 0px; padding: 0.3em 0.5em;&quot;&gt;&lt;a class=&quot;fn-backref&quot; href=&quot;https://docs.python.org/3.3/tutorial/interpreter.html#id1&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;[1]&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;border-radius: 3px; border: 0px; padding: 0.3em 0.5em;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pe Unix, interpretul Python 3.x nu este instalat implicit cu executabilul numit&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;python&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, astfel încât să nu fie în conflict cu un executabil Python 2.x instalat simultan.&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table class=&quot;docutils footnote&quot; frame=&quot;void&quot; id=&quot;id4&quot; rules=&quot;none&quot; style=&quot;border-collapse: collapse; border-radius: 3px; border: 0px; margin-bottom: 10px; margin-top: 10px; min-width: 20%;&quot;&gt;&lt;colgroup&gt;&lt;col class=&quot;label&quot;&gt;&lt;/col&gt;&lt;col&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;tbody valign=&quot;top&quot;&gt;
&lt;tr&gt;&lt;td class=&quot;label&quot; style=&quot;border-radius: 3px; border: 0px; padding: 0.3em 0.5em;&quot;&gt;&lt;a class=&quot;fn-backref&quot; href=&quot;https://docs.python.org/3.3/tutorial/interpreter.html#id2&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;[2]&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;border-radius: 3px; border: 0px; padding: 0.3em 0.5em;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;O problemă cu pachetul GNU Readline poate împiedica acest lucru.&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;3. O introducere informală în Python&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/introduction.html#an-informal-introduction-to-python&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div style=&quot;color: #222222; font-size: 16px; line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În exemplele următoare, intrarea și ieșirea se disting prin prezența sau absența instrucțiunilor (&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/glossary.html#term-&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em class=&quot;xref std std-term&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/glossary.html#term-1&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em class=&quot;xref std std-term&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;...&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;): pentru a repeta exemplul, trebuie să tastați totul după prompt, când apare promptul;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;linii care nu încep cu o solicitare sunt emise de interpret.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Rețineți că un prompt secundar pe o linie de la sine într-un exemplu înseamnă că trebuie să tastați o linie goală;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;acest lucru este folosit pentru a încheia o comandă multi-linie.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #222222; font-size: 16px; line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Multe dintre exemplele din acest manual, chiar și cele introduse la promptul interactiv, includ comentarii.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Comentariile din Python încep cu caracterul hash,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;#&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și se extind până la sfârșitul liniei fizice.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Un comentariu poate apărea la începutul unei linii sau după un spațiu alb sau un cod, dar nu într-un literal șir.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Un caracter hash într-un literal șir este doar un caracter hash.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Deoarece comentariile sunt de clarificare a codului și nu sunt interpretate de Python, ele pot fi omise atunci când tastați în exemple.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #222222; font-size: 16px; line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Cateva exemple:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;color: #222222; font-size: 16px; position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;# acesta este primul comentariu &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;spam &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;= &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;1 &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;  &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;# și acesta este al doilea comentariu &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
          &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;# ... și acum o treime! &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;text &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;= &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&quot;# Acesta nu este un comentariu deoarece este în interiorul citatelor&quot;.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 25.6px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;3.1.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Utilizarea Python ca Calculator&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/introduction.html#using-python-as-a-calculator&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; id=&quot;using-python-as-a-calculator&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;span id=&quot;tut-calculator&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Să încercăm niște comenzi simple de Python.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Porniți interpretul și așteptați solicitarea primară,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;(Nu ar trebui să dureze mult.)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;
&lt;h3 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 22.4px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;3.1.1.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Numere&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/introduction.html#numbers&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;div class=&quot;section&quot; id=&quot;numbers&quot;&gt;
&lt;span id=&quot;tut-numbers&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Interpretul funcționează ca un simplu calculator: puteți tasta o expresie la ea și va scrie valoarea.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Sintaxa de expresie este simplă: operatorii&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;+&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;,&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;-&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;,&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;*&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;/&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;funcționează la fel ca în cele mai multe alte limbi (de exemplu, Pascal sau C);&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;parantezele (&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;) pot fi utilizate pentru grupare.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;+ &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;4 &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; de &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;50 &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;- de &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;5 &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;* &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;6 &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;20 &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( de &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;50 &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;- de &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;5 &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;* &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;6 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;/ &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;4 &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;5.0 &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;8 &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;/ de &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;5 &lt;/span&gt;  &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# diviziune returnează întotdeauna un punct număr flotant &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;1.6&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Numerele întregi (de exemplu&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;,&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;4&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;,&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;20&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;) au tipul&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#int&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;int&quot;&gt;&lt;tt class=&quot;xref py py-class docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;int&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, cele cu o parte fracționată (de ex.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;5.0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;,&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;1.6&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;) au tip&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#float&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;pluti&quot;&gt;&lt;tt class=&quot;xref py py-class docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;float&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Vom vedea mai multe despre tipurile numerice mai târziu în tutorial.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Diviziunea (&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;/&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;) întoarce întotdeauna un flotor.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pentru a face&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/glossary.html#term-floor-division&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em class=&quot;xref std std-term&quot;&gt;diviziunea podelei&lt;/em&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și a obține un rezultat întreg (eliminând orice rezultat fracționat), puteți utiliza&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;//&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;operatorul;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pentru a calcula restul pe care îl puteți utiliza&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;%&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;17 &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;/ &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;3 &lt;/span&gt;  &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# diviziune clasic returnează un flotor &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;5.666666666666667 &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;17 &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;// &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;3 &lt;/span&gt;  &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# diviziune podea aruncate înapoi partea fracționară &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;5 &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;17 &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;% &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;3 &lt;/span&gt;  &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# operatorul% returnează restul împărțirii &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;2 &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt; &amp;gt; &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;5 &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;* &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;3 &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;+ &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;  &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# rezultatul * divizorul + restul &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;17&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Cu Python, este posibil să utilizați&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;operatorul&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;**&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;pentru a calcula puterile&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;footnote-reference&quot; href=&quot;https://docs.python.org/3.3/tutorial/introduction.html#id3&quot; id=&quot;id1&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;[1]&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;5 &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;** &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;  &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# 5 pătrat &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;25 &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;** &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;7 &lt;/span&gt;  &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# 2 la puterea de 7 &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;128&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Semnul egal (&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;=&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;) este folosit pentru a atribui o valoare unei variabile.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Ulterior, nu se afișează niciun rezultat înainte de următorul prompt interactiv:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;latime &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;20 &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;înălțime &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;5 &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;* &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;9 &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;lățime &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;* &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;înălțime &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;900&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă o variabilă nu este &quot;definită&quot; (atribuită o valoare), încercarea de ao utiliza vă va da o eroare:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;n &lt;/span&gt;  &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# încercați să accesați o variabilă nedefinită &lt;/span&gt;
&lt;span class=&quot;gt&quot; style=&quot;color: #0044dd;&quot;&gt;Traceback (ultimul apel ultimul): &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
  Fișierul &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;&quot;&amp;lt;stdin&amp;gt;&quot; &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;, rândul &lt;/span&gt;&lt;span class=&quot;m&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;, în &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&amp;lt;modul&amp;gt; &lt;/span&gt;
&lt;span class=&quot;gr&quot; style=&quot;color: red;&quot;&gt;NameError &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;: &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;numele &#39;n&#39; nu este definit&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Există suport complet pentru punctul de plutire;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;operatorii cu operanzi de tip mixt convertesc operandul intreg la punctul flotant:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;3 &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;* &lt;/span&gt; &lt;span class=&quot;mf&quot; style=&quot;color: #208050;&quot;&gt;3.75 &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;/ &lt;/span&gt; &lt;span class=&quot;mf&quot; style=&quot;color: #208050;&quot;&gt;1.5 &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;7.5 &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;mf&quot; style=&quot;color: #208050;&quot;&gt;7.0 &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;/ &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;3.5&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În modul interactiv, ultima expresie tipărită este atribuită variabilei&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;_&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest lucru înseamnă că, atunci când utilizați Python ca un calculator de birou, este ceva mai ușor să continuați calculele, de exemplu:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;tax &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;mf&quot; style=&quot;color: #208050;&quot;&gt;12.5 &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;/ &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;100 &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;preț &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;mf&quot; style=&quot;color: #208050;&quot;&gt;100.50 &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;preț &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;* &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;taxă &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;12.5625 &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;preț &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;+ &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;_ &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;113.0625 &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;rotund &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;_ &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;113.06&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Această variabilă ar trebui tratată ca utilizată doar de citire.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Nu îi alocați în mod explicit o valoare - ați crea o variabilă locală independentă cu același nume care maschează variabila încorporată cu comportamentul său magic.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În plus față de&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#int&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;int&quot;&gt;&lt;tt class=&quot;xref py py-class docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;int&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#float&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;pluti&quot;&gt;&lt;tt class=&quot;xref py py-class docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;float&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, Python acceptă și alte tipuri de numere, cum ar fi&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/decimal.html#decimal.Decimal&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;decimal.Decimal&quot;&gt;&lt;tt class=&quot;xref py py-class docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Decimal&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/fractions.html#fractions.Fraction&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;fractions.Fraction&quot;&gt;&lt;tt class=&quot;xref py py-class docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Fraction&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Python are, de asemenea, suport încorporat pentru&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/stdtypes.html#typesnumeric&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em&gt;numere complexe&lt;/em&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și utilizează&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sufixul&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;j&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;sau&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;J&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pentru a indica partea imaginară (de ex.&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;3 + 5j&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;).&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;
&lt;h3 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 22.4px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;3.1.2.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Stringuri&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/introduction.html#strings&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;div class=&quot;section&quot; id=&quot;strings&quot;&gt;
&lt;span id=&quot;tut-strings&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pe lângă numere, Python poate manipula și șiruri de caractere, care pot fi exprimate în mai multe moduri.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Ele pot fi închise în citate simple (&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&quot;...&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;) sau citate duble (&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&quot;...&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;) cu același rezultat&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;footnote-reference&quot; href=&quot;https://docs.python.org/3.3/tutorial/introduction.html#id4&quot; id=&quot;id2&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;[2]&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;\&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pot fi folosite pentru a scăpa de citate:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;„ouă de &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;spam“ &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;  &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;citate # singur &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;„ouă de &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;spam“ &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;„doesn &lt;/span&gt;&lt;span class=&quot;se&quot; style=&quot;color: #4070a0; font-weight: bold;&quot;&gt;\“ &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;t „ &lt;/span&gt;  &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;# utilizare \“ pentru a scăpa de un &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;singur citat ... &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;«nu» &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;«nu» &lt;/span&gt;  &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;#. .. sau utilizați în schimb citate duble &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&quot;nu&quot; &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;&quot; Da &quot;, a spus el. &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;- Da, spuse el. &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot; &lt;/span&gt;&lt;span class=&quot;se&quot; style=&quot;color: #4070a0; font-weight: bold;&quot;&gt;\&quot; &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;Da, &lt;/span&gt;&lt;span class=&quot;se&quot; style=&quot;color: #4070a0; font-weight: bold;&quot;&gt;\ &quot; &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;a spus el.&quot; &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;- Da, spuse el. &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;&quot;Isn &lt;/span&gt;&lt;span class=&quot;se&quot; style=&quot;color: #4070a0; font-weight: bold;&quot;&gt;\&#39; &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;t&quot; , a &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;spus ea. &quot; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;- Nu este, spuse ea.&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În interpretul interactiv, șirul de ieșire este inclus în ghilimele și caracterele speciale sunt evacuate cu backslash-uri.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În timp ce acest lucru ar putea uneori să pară diferit de intrare (citatele de închidere se pot modifica), cele două șiruri sunt echivalente.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Șirul este inclus în ghilimele duble în cazul în care șirul conține o singură cotație și nici un ghilimele duble, altfel este inclus în ghilimele simple.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Funcția&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#print&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;imprimare&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;print ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;produce o ieșire mai lizibilă, prin omiterea cotelor de închidere și prin tipărirea caracterelor evacuate și speciale:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;&quot;Isn &lt;/span&gt;&lt;span class=&quot;se&quot; style=&quot;color: #4070a0; font-weight: bold;&quot;&gt;\&#39; &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;t&quot; , a &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;spus ea. &quot; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;- Nu este, spuse ea. &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;Nu este &lt;/span&gt;&lt;span class=&quot;se&quot; style=&quot;color: #4070a0; font-weight: bold;&quot;&gt;&quot; &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;, a spus ea. &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&quot;Nu este,&quot; a spus ea. &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;s &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;Prima linie. &lt;/span&gt;&lt;span class=&quot;se&quot; style=&quot;color: #4070a0; font-weight: bold;&quot;&gt;\ n &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;Al doilea rând. &quot; &lt;/span&gt;  &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# \ n înseamnă noua linie &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;s &lt;/span&gt;  &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# fără imprimare (), \ n este inclusă în ieșirea &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&quot;Prima linie. \ nLinița a doua&quot;. &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;s &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;  &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# with print (), \ n produce o nouă linie &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;Prima linie. &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;A doua linie.&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă nu vreți ca caracterele prefabricate de&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;\&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;să fie interpretate ca caractere speciale, puteți utiliza&amp;nbsp;&lt;/span&gt;&lt;em&gt;șiruri brute&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;prin adăugarea unui&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;r&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;înaintea primei citate:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;C: \ some &lt;/span&gt;&lt;span class=&quot;se&quot; style=&quot;color: #4070a0; font-weight: bold;&quot;&gt;\ n &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;ame&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;  &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# aici \ n înseamnă newline! &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;C: \ some &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;ame &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;r&#39;C: \ some \ name &#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;  &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# notați r înainte de citatul &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;C: \ some \ name&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Stratul literal poate cuprinde mai multe linii.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;O modalitate este folosirea citatelor triple:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&quot;&quot; &quot;...&quot; &quot;&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sau&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&quot;&#39;&#39; ... &#39;&#39; &#39;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Sfârșitul liniilor este inclus automat în șir, dar este posibil să se împiedice acest lucru prin adăugarea unui&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;\&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;la capătul liniei.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Următorul exemplu:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;imprimare &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;„“ „ &lt;/span&gt;&lt;span class=&quot;se&quot; style=&quot;color: #4070a0; font-weight: bold;&quot;&gt;\ &lt;/span&gt;
&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;Utilizare: thingy [OPȚIUNI] &lt;/span&gt;
&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;     -h Afișează acest mesaj de &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;folosire a &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;     HOST - &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;ului H nume de &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;gazdă pentru a se &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;conecta la &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;«»“ &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;produce următoarea ieșire (rețineți că noua linie inițială nu este inclusă):&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-text&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Utilizare: lucru [OPȚIUNI]&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
     -h Afișați acest mesaj de utilizare&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
     -H Numele gazdei pentru care se conectează&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Șirurile pot fi concatenate (lipite împreună) cu&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;operatorul&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;+&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și repetate cu&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;*&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# 3 ori &#39;un&#39;, urmat de &#39;ium&#39; &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;3 &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;* &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;un&#39; &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;+ &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;ium&#39; &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39;unununium&#39;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Două sau mai multe&amp;nbsp;&lt;/span&gt;&lt;em&gt;literali de șir&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;(adică cele cuprinse între citate) unul lângă celălalt sunt concatenate automat.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;Py&#39; &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;thon&#39; &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39;Python&#39;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest lucru funcționează numai cu doi literali, dar nu cu variabile sau expresii:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;prefix &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;Py&#39; &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;prefixul &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;thon&#39; &lt;/span&gt;  &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# nu poate concatena o variabila si un sir literal &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;  ... &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;SyntaxError: sintaxa invalida &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;un&#39; &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;* &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;3 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;ium&#39; &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;  ... &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;SyntaxError : sintaxa invalida&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă doriți să concatenați variabile sau o variabilă și literală, folosiți&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;+&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;prefix &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;+ &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;thon&#39; &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39;Python&#39;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Această caracteristică este utilă în special atunci când doriți să rupeți șiruri lungi:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;text &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;Puneți mai multe șiruri în paranteze&#39; &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;            &#39;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;text &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39; Puneți mai multe șiruri în paranteze pentru a le uni.&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Șirul poate fi&amp;nbsp;&lt;/span&gt;&lt;em&gt;indexat&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;(abonat), primul caracter având index 0. Nu există un tip de caractere separat;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;un personaj este pur și simplu un șir de mărimea unu:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cuvânt &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;Python&#39; &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cuvânt &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;0 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt;  &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# caracter în poziția 0 &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39;P&#39; &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cuvânt &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;5 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt;  &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# caracter în poziția 5 &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39;n&#39;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Indicii pot fi și numere negative, pentru a începe numărarea din dreapta:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cuvânt &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;- &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt;  &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# ultimul caracter &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39;n&#39; &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cuvânt &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;- &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt;  &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;# a &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;doua ultimul caracter &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39;o&#39; &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cuvânt &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;- &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;6 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39;P&#39;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Rețineți că din moment ce -0 este același ca 0, indicii negativi încep de la -1.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În plus față de indexare,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;este suportat și&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;felierea&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În timp ce indexarea este folosită pentru a obține caractere individuale,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;felierea&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;vă permite să obțineți subrețele:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cuvânt &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;0 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt;  &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# caractere din poziția 0 (inclus) la 2 (exclus) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39;Py&#39; &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cuvânt &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;5 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt;  &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# caractere din poziția 2 (inclus) la 5 (exclus) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39;Tho&#39;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Rețineți cum este inclus întotdeauna începutul, iar sfârșitul este întotdeauna exclus.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest lucru face ca&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;s [: i]&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;+&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;s [i:] să&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;fie întotdeauna egal cu&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;s&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cuvânt &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[: &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;+ &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cuvânt &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:] &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39;Python&#39; &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cuvânt &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[: &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;4 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;+ &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cuvânt &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;4 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:] &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39;Python&#39;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Indicii de segmentare au valori implicite utile;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;un indice primul omis este implicit zero, un indice al doilea omis este implicit la dimensiunea șirului care este tăiat.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cuvânt &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[: &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt;  &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;# de &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;caractere de la început până la poziția 2 (exclus) &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39;Py&#39; &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cuvânt &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;4 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:] &lt;/span&gt;  &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;# caractere de &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;la poziția 4 (inclus) la sfârșitul anului &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39;pe&#39; &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cuvânt &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;- &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:] &lt;/span&gt; &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# caractere de la al doilea - ultimul (inclus) până la capătul &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&quot;pe&quot;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;O modalitate de a ne aminti cum funcționează felii este să ne gândim la indicii ca fiind indicatori&amp;nbsp;&lt;/span&gt;&lt;em&gt;între&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;caractere, cu marginea din stânga a primului caracter numerotat 0. Apoi marginea dreaptă a ultimului caracter al unui șir de&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;caractere&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;n&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;are indicele&amp;nbsp;&lt;/span&gt;&lt;em&gt;n&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, de exemplu:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;+ --- + --- + --- + --- + --- + --- + &lt;/span&gt;
 &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;| &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;P &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;| &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;| &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;t &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;| &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;h &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;| &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;o &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;| &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;n &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;| &lt;/span&gt;
 &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;+ --- + --- + --- + --- + --- + --- + &lt;/span&gt;
 &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;0 &lt;/span&gt;   &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;   &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;   &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;3 &lt;/span&gt;   &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;4 &lt;/span&gt;   &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;5 &lt;/span&gt;   &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;6 &lt;/span&gt;
&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;- &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;6 &lt;/span&gt;  &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;- &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;5 &lt;/span&gt;  &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;- &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;4 &lt;/span&gt;  &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;- &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;3 &lt;/span&gt;  &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;- &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;  &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;- &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Primul rând de numere dă poziția indicilor 0 ... 6 în șir;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;al doilea rând dă indicii negativi corespunzători.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Felia de la&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;i&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;la&amp;nbsp;&lt;/span&gt;&lt;em&gt;j&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;constă din toate caracterele dintre marginile etichetate&amp;nbsp;&lt;/span&gt;&lt;em&gt;i&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;respectiv&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;j&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pentru indicii non-negativi, lungimea unei felii este diferența dintre indicii, dacă ambele sunt în limite.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu, lungimea&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;cuvântului [1: 3]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este 2.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Încercarea de a utiliza un index care este prea mare va duce la o eroare:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cuvânt &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;42 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt;  &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# cuvântul are doar 7 caractere &lt;/span&gt;
&lt;span class=&quot;gt&quot; style=&quot;color: #0044dd;&quot;&gt;Traceback (cel mai recent apel ultimul): &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
  Fișierul &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;&quot;&amp;lt;stdin&amp;gt;&quot; &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;, rândul &lt;/span&gt;&lt;span class=&quot;m&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;, în &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&amp;lt;modul&amp;gt; &lt;/span&gt;
&lt;span class=&quot;gr&quot; style=&quot;color: red;&quot;&gt;IndexError &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;: &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;indicele șir din interval&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Cu toate acestea, indicele de raportare din rază de acțiune este tratat grațios atunci când este utilizat pentru tăierea:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cuvânt &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;4 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;42 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39;pe&#39; &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cuvânt &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;42 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:] &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39;&#39;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Comenzile Python nu pot fi schimbate - ele sunt&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/glossary.html#term-immutable&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em class=&quot;xref std std-term&quot;&gt;imuabile&lt;/em&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Prin urmare, atribuirea unei poziții indexate în șir rezultă dintr-o eroare:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;word &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;0 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;J&#39; &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;  ... &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;TypeError: obiectul &#39;str&#39; nu suporta atribuirea elementului &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;word &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:] &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;py&#39; &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;  ... &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;TypeError: misiune&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă aveți nevoie de un șir diferit, ar trebui să creați unul nou:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;J&#39; &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;+ &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cuvânt &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:] &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39;Jython&#39; &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cuvânt &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[: &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;+ &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;py &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Funcția încorporată&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#len&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;Len&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;len ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;returnează lungimea unui șir:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;s &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;supercalifragilisticexpialidocious&#39; &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;len &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;s &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;34&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;admonition seealso&quot; style=&quot;background-color: #ffffcc; border-radius: 3px; border: 1px solid rgb(221, 221, 102); margin-bottom: 10px; margin-top: 10px; padding: 7px;&quot;&gt;
&lt;div class=&quot;first admonition-title&quot; style=&quot;display: inline; font-weight: bold; line-height: 22.4px; margin-bottom: 5px; margin-right: 10px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Vezi si&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;dl class=&quot;last docutils&quot; style=&quot;margin-bottom: 0px;&quot;&gt;
&lt;dt style=&quot;font-weight: bold;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/stdtypes.html#textseq&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em&gt;Tipul secvenței de text - p&lt;/em&gt;&lt;/a&gt;&lt;/dt&gt;
&lt;dd style=&quot;line-height: 20.8px; margin-bottom: 10px; margin-left: 30px; margin-top: 3px; text-align: justify;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Șirurile sunt exemple de&amp;nbsp;&lt;/span&gt;&lt;em&gt;tipuri de secvențe&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și sprijină operațiile comune susținute de astfel de tipuri.&lt;/span&gt;&lt;/dd&gt;
&lt;dt style=&quot;font-weight: bold;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/stdtypes.html#string-methods&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em&gt;Metode de șir&lt;/em&gt;&lt;/a&gt;&lt;/dt&gt;
&lt;dd style=&quot;line-height: 20.8px; margin-bottom: 10px; margin-left: 30px; margin-top: 3px; text-align: justify;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Șirurile suportă un număr mare de metode pentru transformări și căutări de bază.&lt;/span&gt;&lt;/dd&gt;
&lt;dt style=&quot;font-weight: bold;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/string.html#string-formatting&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em&gt;String Formatare&lt;/em&gt;&lt;/a&gt;&lt;/dt&gt;
&lt;dd style=&quot;line-height: 20.8px; margin-bottom: 10px; margin-left: 30px; margin-top: 3px; text-align: justify;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Informații despre formatarea șirului cu&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/stdtypes.html#str.format&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;str.format&quot;&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;str.format ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;sunt descrise aici.&lt;/span&gt;&lt;/dd&gt;
&lt;dt style=&quot;font-weight: bold;&quot;&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/stdtypes.html#old-string-formatting&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em&gt;printf-stil de formatare de caractere&lt;/em&gt;&lt;/a&gt;&lt;/dt&gt;
&lt;dd style=&quot;line-height: 20.8px; margin-bottom: 10px; margin-left: 30px; margin-top: 3px; text-align: justify;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Vechile operații de formatare invocate atunci când șiruri de caractere și șiruri de caractere Unicode sunt operandul stâng al&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;operatorului&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;%&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;sunt descrise mai detaliat aici.&lt;/span&gt;&lt;/dd&gt;&lt;/dl&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;
&lt;h3 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 22.4px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;3.1.3.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Liste&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/introduction.html#lists&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;div class=&quot;section&quot; id=&quot;lists&quot;&gt;
&lt;span id=&quot;tut-lists&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Python cunoaște un număr de&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;tipuri de date&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;compuse&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, utilizate pentru a grupa alte valori.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Cea mai versatilă este&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;lista&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;care poate fi scrisă ca o listă de valori (elemente) separate între virgulă între paranteze pătrate.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Listele ar putea conține elemente de diferite tipuri, dar, de obicei, toate elementele au același tip.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pătrate &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;4 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;9 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;16 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;25 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pătrate &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;[1, 4, 9, 16, 25]&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Ca șiruri de caractere (și toate celelalte&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;tipuri de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/glossary.html#term-sequence&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em class=&quot;xref std std-term&quot;&gt;secvențe&lt;/em&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;încorporate&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;), listele pot fi indexate și tăiate:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pătrate &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;0 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt;  &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# indexarea returnează elementul &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;1 &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pătrate &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;- &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;25 &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pătrate &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;- &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;3 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:] &lt;/span&gt;  &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# slicing returnează o nouă listă &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;[9, 16, 25]&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Toate operațiile cu secțiuni returnează o nouă listă care conține elementele solicitate.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Aceasta înseamnă că următoarea secțiune returnează o nouă copie (superficială) a listei:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pătrate &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[:] &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;[1, 4, 9, 16, 25]&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Listele acceptă, de asemenea, operații cum ar fi concatenarea:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pătrate &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;+ &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;36 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;49 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;64 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;81 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;100 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;[1, 4, 9, 16, 25, 36, 49, 64, 81, 100]&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Spre deosebire de șiruri de caractere, care sunt&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/glossary.html#term-immutable&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em class=&quot;xref std std-term&quot;&gt;imuabile&lt;/em&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, listele sunt un&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;tip&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/glossary.html#term-mutable&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em class=&quot;xref std std-term&quot;&gt;mutable&lt;/em&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, adică este posibil să se modifice conținutul acestora:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cuburi &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;8 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;27 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;65 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;125 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt;  &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# ceva e greșit aici &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;4 &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;** &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;3 &lt;/span&gt;  &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# cubul de 4 este 64, nu 65! &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;64 &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cuburi &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;3 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;64 &lt;/span&gt;  &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# înlocuiți valoarea greșită &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cuburi &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;[1, 8, 27, 64, 125]&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Puteți adăuga , de&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;asemenea ,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;elemente noi ,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;la sfârșitul listei, folosind&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;append ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&amp;nbsp;&lt;em&gt;metoda&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;(vom vedea mai multe despre metodele de&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;mai târziu):&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cuburi &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;adăugați &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;216 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;  &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# adăugați cubul de 6 &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cuburi &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;adăugați &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;7 &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;** &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;3 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;  &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# și cubul de 7 &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cuburi &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;[1, 8, 27, 64, 125, 216, 343]&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De asemenea, este posibilă alocarea în felii, ceea ce poate chiar să modifice dimensiunea listei sau să o elimine complet:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;litere &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;a&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;b&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;c&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;d&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;e&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;f&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;g&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;litere &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;[ &#39;a&#39;, &#39;b&#39;, &#39;c&#39; , &#39;d&#39;, &#39;e&#39;, &#39;f&#39;, &#39;g&#39;] &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# înlocui unele valori &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;litere &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;5 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;C&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;d&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;e&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;literele &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;[&#39;a&#39;, &#39;b&#39;, &#39;C&#39;, &#39;D &#39;,&#39; E &#39;,&#39; f &#39;,&#39; g &#39;] &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# eliminați-le acum &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;litere &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;5 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[] &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;litere &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;[, &#39;b&#39; &#39;o&#39; &#39;f&#39;, &#39;g&#39;] &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# șterge lista prin înlocuirea tuturor elementelor cu o listă goală &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;litere &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[:] &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[] &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;litere &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;[]&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Funcția built-in&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#len&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;Len&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;len ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;se aplică și listelor:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;litere &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;a&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;b&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;c&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;d&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;len &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;litere &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;4&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Este posibil să se creeze liste (creați liste care conțin alte liste), de exemplu:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;a&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;b&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;c&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;n &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;3 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;n &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;[[ &#39;o&#39;, &#39;b&#39;, &#39;c&#39;], [1, 2, 3]] &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;0 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;[, &#39;b&#39; &#39;o&#39;, &#39;c&#39;] &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;0 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] [ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39;b&#39;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 25.6px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;3.2.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Primii pași spre programare&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/introduction.html#first-steps-towards-programming&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; id=&quot;first-steps-towards-programming&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;span id=&quot;tut-firststeps&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Desigur, putem folosi Python pentru sarcini mai complicate decât adăugarea a două și două împreună.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu, putem scrie o sub-secvență inițială a&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;seriei&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;Fibonacci&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;după cum urmează:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# Seria Fibonacci: &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;&lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# suma celor două elemente definește următoarea &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;b &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;0 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; în &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;timp ce &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;b &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&amp;lt; &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;10 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;b &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;n&quot;&gt;a &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;b &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;b &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;a &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;+ &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;b &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;1 &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;1 &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;2 &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;3 &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;5 &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;8&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest exemplu introduce câteva caracteristici noi.&lt;/span&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;div class=&quot;first&quot; style=&quot;line-height: 22.4px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Prima linie conține o&amp;nbsp;&lt;/span&gt;&lt;em&gt;asignare multiplă&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;: variabilele&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;a&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;b&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;obțin simultan noile valori 0 și 1. Pe ultima linie se folosește din nou, demonstrând că expresiile din partea dreaptă sunt evaluate înainte de oricare dintre alocările avea loc.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Expresiile din partea dreaptă sunt evaluate de la stânga la dreapta.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;div class=&quot;first&quot; style=&quot;line-height: 22.4px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#while&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În timp ce&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;bucla execută atâta timp cât condiția (aici:&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;b&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;lt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;10&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;) rămâne adevărată.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În Python, ca în C, orice valoare întregă non-zero este adevărată;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;zero este falsă.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Condiția poate fi, de asemenea, o valoare de șir sau de listă, de fapt orice secvență;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;orice lucru cu o lungime diferită de zero este adevărat, secvențele goale sunt false.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Testul utilizat în exemplu este o simplă comparație.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Operatorii de comparare standard sunt scrise la fel ca în C:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;(mai puțin decât),&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;(mai mare decât),&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;==&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;(egal cu),&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;lt;=&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;(mai mic sau egal cu),&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt; =&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;(mai mare sau egal cu) și&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;! =&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;(nu egal cu).&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;div class=&quot;first&quot; style=&quot;line-height: 22.4px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;em&gt;Corpul&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;buclei este&amp;nbsp;&lt;/span&gt;&lt;em&gt;indentat&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;: indentare este modul de grupare a&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;declarațiilor lui Python.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;La solicitarea interactivă, trebuie să introduceți o filă sau spațiu (e) pentru fiecare linie indentată.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În practică, veți pregăti o intrare mai complicată pentru Python cu un editor de text;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;toți editorii de text decent au o facilitate automată.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Când o instrucțiune compusă este introdusă interactiv, trebuie să fie urmată de o linie necompletată pentru a indica finalizarea (deoarece parserul nu poate ghici când ați tastat ultima linie).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Rețineți că fiecare linie dintr-un bloc de bază trebuie să fie indentată de aceeași sumă.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;div class=&quot;first&quot; style=&quot;line-height: 22.4px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Funcția&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#print&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;imprimare&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;print ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;scrie valoarea argumentului (argumentelor) pe care este dat.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acesta diferă de scrierea expresiei pe care doriți să o scrieți (așa cum am făcut-o mai devreme în exemplele de calcul) în modul în care gestionează mai multe argumente, cantități în virgulă mobilă și șiruri de caractere.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Șirurile sunt tipărite fără ghilimele și un spațiu este inserat între ele, astfel încât să puteți formata lucrurile frumos, cum ar fi:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;256 &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;* &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;256 &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;Valoarea i este&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;i &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;Valoarea lui i este 65536&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;em&gt;Sfârșitul&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;argumentului pentru cuvinte cheie&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;poate fi folosit pentru a evita linia nouă după ieșire sau pentru a termina ieșirea cu un șir diferit:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;b &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;0 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; în &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;timp ce &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;b &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&amp;lt; &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1000 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;b &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;end &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;n&quot;&gt;a &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;b &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;b &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;a &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;+ &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;b &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;1,1, 2,3,5,8,13,21,34,55,89,144,233,377,610,987,&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;rubric&quot; style=&quot;font-weight: bold; line-height: 22.4px; margin-top: 30px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Note de subsol&lt;/span&gt;&lt;/div&gt;
&lt;table class=&quot;docutils footnote&quot; frame=&quot;void&quot; id=&quot;id3&quot; rules=&quot;none&quot; style=&quot;border-collapse: collapse; border-radius: 3px; border: 0px; margin-bottom: 10px; margin-top: 10px; min-width: 20%;&quot;&gt;&lt;colgroup&gt;&lt;col class=&quot;label&quot;&gt;&lt;/col&gt;&lt;col&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;tbody valign=&quot;top&quot;&gt;
&lt;tr&gt;&lt;td class=&quot;label&quot; style=&quot;border-radius: 3px; border: 0px; padding: 0.3em 0.5em;&quot;&gt;&lt;a class=&quot;fn-backref&quot; href=&quot;https://docs.python.org/3.3/tutorial/introduction.html#id1&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;[1]&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;border-radius: 3px; border: 0px; padding: 0.3em 0.5em;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Deoarece&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;**&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;are precedență mai mare decât&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;-&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;-3 ** 2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;va fi interpretată ca&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;- (3 ** 2)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și rezultând astfel în&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;-9&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pentru a evita acest lucru și a obține&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;9&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, puteți utiliza&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;(-3) ** 2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table class=&quot;docutils footnote&quot; frame=&quot;void&quot; id=&quot;id4&quot; rules=&quot;none&quot; style=&quot;border-collapse: collapse; border-radius: 3px; border: 0px; margin-bottom: 10px; margin-top: 10px; min-width: 20%;&quot;&gt;&lt;colgroup&gt;&lt;col class=&quot;label&quot;&gt;&lt;/col&gt;&lt;col&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;tbody valign=&quot;top&quot;&gt;
&lt;tr&gt;&lt;td class=&quot;label&quot; style=&quot;border-radius: 3px; border: 0px; padding: 0.3em 0.5em;&quot;&gt;&lt;a class=&quot;fn-backref&quot; href=&quot;https://docs.python.org/3.3/tutorial/introduction.html#id2&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;[2]&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;border-radius: 3px; border: 0px; padding: 0.3em 0.5em;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Spre deosebire de alte limbi, caracterele speciale precum&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;\ n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;au același înțeles atât cu&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;citate&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;simple (&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&quot;...&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;), cât și duble (&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&quot;...&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Singura diferență dintre cele două este că în cadrul citatelor unice nu trebuie să scăpați&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;(dar trebuie să scăpați&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;) și invers.&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h1&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;4. Mai multe instrumente de&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;control al&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;fluxului&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/controlflow.html#more-control-flow-tools&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div style=&quot;color: #222222; font-size: 16px; line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pe lângă&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#while&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;timp ce&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;declarația tocmai a&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;introdus, Python cunoaște de obicei declarațiile de&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;control al&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;fluxului cunoscute din alte limbi, cu unele răsturnări de&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;situație.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/span&gt;&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 25.6px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;4.1.&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#if&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 24.704px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;dacă&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;Declarațiile&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/controlflow.html#if-statements&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; id=&quot;if-statements&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;span id=&quot;tut-if&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Probabil cel mai cunoscut tip de declarație este&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;declarația&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#if&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;if&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;int &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;input &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&quot;Vă rugăm să &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;introduceți un număr întreg:&quot; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;Introduceți un număr întreg: 42 &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;dacă &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&amp;lt; &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;0 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;n&quot;&gt;x &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;0 &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;Negativ schimbat la zero&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;elif &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;== &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;0 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;Zero&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;elif &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;== &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;Single&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;alt &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;Mai mult &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;Mai mult&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pot exista zero sau mai multe&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;părți&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#elif&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;elif&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, iar&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#else&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;cealaltă&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;parte este opțională.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Cuvântul cheie &quot;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#elif&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;elif&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;&quot; este scurt pentru &quot;altceva dacă&quot; și este util pentru a evita indentarea excesivă.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;O&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;secvență&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#if&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;if if&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;...&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#elif&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;elif&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;...&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#elif&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;elif&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;... este un înlocuitor al&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;declarațiilor de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;comutare&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;sau de&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;caz&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;găsite în alte limbi.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , &amp;quot;serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;Sursa
:&amp;nbsp;&lt;a href=&quot;https://docs.python.org/3.3/tutorial/classes.html&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;https://docs.python.org/3.3/tutorial/classes.html&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/h1&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://infotestpc.blogspot.com/feeds/1443472297670308002/comments/default' title='Postare comentarii'/><link rel='replies' type='text/html' href='http://infotestpc.blogspot.com/2018/01/python-un-program-accesibil-1.html#comment-form' title='1 comentarii'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5038728009841547747/posts/default/1443472297670308002'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5038728009841547747/posts/default/1443472297670308002'/><link rel='alternate' type='text/html' href='http://infotestpc.blogspot.com/2018/01/python-un-program-accesibil-1.html' title='Python , un limbaj accesibil 1'/><author><name>Al Con</name><uri>http://www.blogger.com/profile/17409243868650327707</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgN57nICR5fE0TUUQ9e2KJYpGoPIILlDqi6mVUSQf2VZ7CeVa_0DbsD4iXMv1yCVKiaaRGqWN9s0S5s9bAPLewIJNyf82AqkBYfGQbFq8KK_kne3mwCziLRnPbkr-QA0dNagt-4I-0ePA/s72-c/22279590_1924695991.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5038728009841547747.post-6738409679269996304</id><published>2018-01-19T13:31:00.003-08:00</published><updated>2020-12-16T12:03:07.545-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Calculatorul"/><category scheme="http://www.blogger.com/atom/ns#" term="Initiere"/><category scheme="http://www.blogger.com/atom/ns#" term="Kali Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="Module"/><category scheme="http://www.blogger.com/atom/ns#" term="programare"/><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><category scheme="http://www.blogger.com/atom/ns#" term="Site"/><title type='text'>Python un lombaj accesibil </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px; text-align: center;&quot;&gt;
&lt;/h1&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAIxRvdVMKDJN8nrCzyIm6YPuJBqRXVX0i1sxRcDgCRnMB5G3ZcvGnSux_4o2G5PmpHn1isxq41XmRUTwDCuggIaLWNw6X8bFTe-uWQtlFB3ZAeFFgarhwxGf-UpbU64LkyjybvXQ5ow/s524/Copii.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;350&quot; data-original-width=&quot;524&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAIxRvdVMKDJN8nrCzyIm6YPuJBqRXVX0i1sxRcDgCRnMB5G3ZcvGnSux_4o2G5PmpHn1isxq41XmRUTwDCuggIaLWNw6X8bFTe-uWQtlFB3ZAeFFgarhwxGf-UpbU64LkyjybvXQ5ow/s320/Copii.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 25.6px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;4.2.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#for&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 24.704px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pentru&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt; &amp;nbsp;declarații&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/controlflow.html#for-statements&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la această titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; id=&quot;for-statements&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;span id=&quot;tut-for&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div id=&quot;index-0&quot; style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Instrucțiunea&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#for&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pentru&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt; &amp;nbsp;Python diferă puțin de ceea ce puteți folosi în C sau Pascal.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Mai mult decât oricare ar fi iterând asupra unei evoluții aritmetice a numerelor (ca în cazul lui Pascal) sau oferind utilizatorului posibilitatea de a defini atât etapa de repetare, cât și starea de oprire (ca C),&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;instrucțiunea&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;lui Python&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#for&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pentru&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt; &amp;nbsp;iterație se&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;repetă asupra elementelor din orice secvență (o listă sau un șir), în ordinea în care apar în secvență.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu (nu este destinat jocului):&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;# Măsura unele &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;caractere &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;de &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;caractere:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt; ... &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;cuvinte &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;= &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;[ &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&#39;pisică&#39; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;, &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&#39;fereastră&#39; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;, &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&#39;defenestrate&#39; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;] &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pentru &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;w &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;în &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;cuvinte &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;: &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;... &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;printare &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;( &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;w &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;, &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Len &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;( &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;w &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;)) &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;.. . &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pisică 3 &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;fereastra 6 &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;defenestrate 12&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă trebuie să modificați secvența pe care o repetați în interiorul bucla (de exemplu, pentru a duplica elementele selectate), este recomandat să creați o copie.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Iterarea unei secvențe nu se face implicit o copie.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Notatia de felie fata ca acest lucru deosebit de convenabil:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pentru &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;w &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;version &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;cuvinte &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;[:]: &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;  &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;# Bucla Faceți o copie cu peste un INTREGII Secțiune liste. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;... &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;dacă &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;lămâie &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;( &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;w &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;) &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;6 &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;: &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;... &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;        &lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;cuvinte &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;inserați &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;( &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;0 &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;, &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;w &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;) &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;... &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;cuvinte &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;[&#39;defenestrate&#39;, &#39;cat&#39;, &#39;fereastră&#39;, &#39;defenestrate&#39;]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 25.6px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;4.3.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/stdtypes.html#range&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;Gama&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 24.704px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Intervalul ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt; &amp;nbsp;Funcția&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/controlflow.html#the-range-function&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la această titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; id=&quot;the-range-function&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;span id=&quot;tut-range&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă trebuie să repetați o secvență de numere,&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/stdtypes.html#range&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;Gama&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;intervalul de&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;funcții încorporat&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/stdtypes.html#range&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;Gama&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;()&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este la îndemână.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Aceasta generează progrese aritmetice:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;i &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;intervalul &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;5 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;0 &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;1 &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;2 &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;3 &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;4&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Punctul final dat nu este niciodată parte a secvenței generate;&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;intervalul (10)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;generează 10 valori, indici legali pentru elementele cu o secvență de lungime 10. Este posibil să lăsăm intervalul să înceapă la un alt număr sau să specificăm o altă valoare (chiar negativă, uneori se numește &quot;pas&quot; ):&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;intervalul &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;5 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;10 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) de la &lt;/span&gt;
   &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;5 &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;la &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;9&lt;/span&gt;

&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;intervalul &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;0 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;10 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;3 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
   &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;0 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;3 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;6 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;9&lt;/span&gt;

&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;Gama &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;- &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;10 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;- &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;100 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;- &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;30 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
  &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;- &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;10 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;- &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;40 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;- &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;70&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pentru a itera peste indicii unei secvențe, puteți combina&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/stdtypes.html#range&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;Gama&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;range ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#len&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;Len&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;len ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;după cum urmează:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;Maria&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&#39; a &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;avut&#39; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;o&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;mic&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;miel&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;i &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;gama &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;len &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)): &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;o &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;0 Mary &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;1 avea &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;2 și &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;3 puține &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;4 mieluri&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În majoritatea acestor cazuri, cu toate acestea, este convenabil să utilizați funcția&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#enumerate&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;enumera&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;enumerate ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, consultați&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/datastructures.html#tut-loopidioms&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em&gt;tehnicile de buclă&lt;/em&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Un lucru ciudat se întâmplă dacă imprimați doar o gamă:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;imprimare &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;interval &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;10 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;interval (0, 10)&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În multe privințe, obiectul returnat de&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/stdtypes.html#range&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;Gama&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;domeniul ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;se comportă ca și cum ar fi o listă, dar de fapt nu este.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Este un obiect care returnează elementele succesive ale secvenței dorite atunci când o iterați peste ea, dar nu face într-adevăr lista, economisind astfel spațiu.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Spunem că un astfel de obiect este&amp;nbsp;&lt;/span&gt;&lt;em&gt;iterabil&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, adică potrivit ca țintă pentru funcții și construcții care se așteaptă la ceva din care pot obține elemente succesive până la epuizarea aprovizionării.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Am văzut că&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;declarația&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#for&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pentru&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este un astfel de&amp;nbsp;&lt;/span&gt;&lt;em&gt;iterator&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/stdtypes.html#list&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;Lista&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Lista de&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;funcții&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/stdtypes.html#list&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;Lista&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;()&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este alta;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;creează liste de la iterables:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;lista &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;intervalul &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;5 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;[0, 1, 2, 3, 4]&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Mai târziu vom vedea mai multe funcții care returnează iterabile și vor lua iterații ca argument.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 25.6px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;4.4.&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/simple_stmts.html#break&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 24.704px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;întrerupeți&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/simple_stmts.html#continue&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 24.704px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;continuați&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;declarațiile, și&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#else&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 24.704px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;altfel&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Clauzele pe buclă&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/controlflow.html#break-and-continue-statements-and-else-clauses-on-loops&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la această titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; id=&quot;break-and-continue-statements-and-else-clauses-on-loops&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;span id=&quot;tut-break&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/simple_stmts.html#break&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pauză&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;declarație, cum ar fi în C, izbucnește celui mai mic&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#for&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pentru&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;sau în&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#while&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;timp ce&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;bucla.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Comportamentele buclă pot avea o&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;altă&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;clauză;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;se execută atunci când bucla se termină prin epuizarea listei (cu&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#for&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;for&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;) sau atunci când condiția devine falsă (cu&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#while&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;timp&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;), dar nu și atunci când bucla este terminată printr-o&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;declarație de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/simple_stmts.html#break&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pauză&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest lucru este exemplificat de următoarea buclă, care caută numere prime:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;n &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;intervalul &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;10 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;intervalul &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;n &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;        &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;dacă &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;n &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;% &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;== &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;0 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;            &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;n &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;equals&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;*&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;n &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;// &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;            &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pauză &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;altceva &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;        &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# buclă a căzut fără a găsi un factor &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;        &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;n &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;„este un număr prim“ &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;2 este un număr prim &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;3 este un număr prim &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;4 este egal cu &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;2 * 2 &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;5 este un număr prim &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;6 este egal cu &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;2 * 3 &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;7 este un număr prim &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;8 este egal cu &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;2 * 4 &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;9 egal cu &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;3 * 3&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;(Da, acest lucru este codul corect Uită -&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;te atent:.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Altfel&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;clauza aparține&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#for&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pentru&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;bucla,&amp;nbsp;&lt;/span&gt;&lt;strong&gt;nu&amp;nbsp;&lt;/strong&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#if&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;dacă&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;. Statement)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Atunci când este&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;utilizat cu o buclă,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;altfel&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;clauza are mai multe în comun cu&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;altcineva&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;clauza de o&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#try&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;încercare&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;declarație decât o face cea în&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#if&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;cazul&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;în declarații: o&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#try&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;încercare&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;declarație de&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;altă&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;clauză rulează atunci când are loc nici o&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;excepție, și o buclă de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;altă&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;clauză funcționează atunci când nu&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pauză&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;apare .&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pentru mai multe informații despre&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;instrucțiunile de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#try&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;încercare&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și despre excepții, consultați&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/errors.html#tut-handling&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em&gt;Excepții de manipulare&lt;/em&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Declarația&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/simple_stmts.html#continue&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;continuă&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, de asemenea împrumutată de la C, continuă cu următoarea iterație a buclei:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;num &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;interval &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;10 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;if &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;num &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;% &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;== &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;0 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;        &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;A găsit un număr par&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;num &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;        &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;continue &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot; num &quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;num &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) a &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;găsit un număr par 2 a &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;găsit un număr 3 a &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;găsit un număr par 4 a &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;găsit un număr 5 a &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;găsit un număr par 6 a &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;găsit un număr 7 a &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;găsit un număr par 8 a &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;găsit un număr 9&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 25.6px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;4.5.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;declarații&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/simple_stmts.html#pass&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 24.704px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;trecute&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/controlflow.html#pass-statements&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la această titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; id=&quot;pass-statements&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;span id=&quot;tut-pass&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Declarația de&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/simple_stmts.html#pass&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;trecere&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;nu face nimic.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acesta poate fi folosit atunci când o declarație este cerută sintactic, dar programul nu necesită nicio acțiune.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; în &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;timp ce &lt;/span&gt; &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;True &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pass &lt;/span&gt;  &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# Busy-așteptați întreruperea tastaturii (Ctrl + C) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;...&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest lucru este folosit în mod obișnuit pentru crearea unor clase minime:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;clasa &lt;/span&gt; &lt;span class=&quot;nc&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;MyEmptyClass &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;treci &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;...&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Un alt loc de&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/simple_stmts.html#pass&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;trecere&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;poate fi folosit ca un suport pentru o funcție sau un corp condiționat atunci când lucrați la un nou cod, permițându-vă să continuați să vă gândiți la un nivel mai abstract.&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/simple_stmts.html#pass&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Trecere&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este ignorat în&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;tăcere:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;def &lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;initlog &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;* &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;args &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pass &lt;/span&gt;   &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# Amintiți-vă să implementați acest lucru! &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;...&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 25.6px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;4.6.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Definirea funcțiilor&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/controlflow.html#defining-functions&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la această titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; id=&quot;defining-functions&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;span id=&quot;tut-functions&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Putem crea o funcție care scrie seria Fibonacci la o limită arbitrară:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;def &lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;fib &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;n &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;    &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# scrie seria Fibonacci pana la n &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;sd&quot; style=&quot;color: #4070a0; font-style: italic;&quot;&gt;&quot;&quot; &quot;Imprimați o serie Fibonacci pana la n&quot; &quot;&quot; &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;n&quot;&gt;a &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;b &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;0 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... în &lt;/span&gt;    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;timp ce &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;o &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&amp;lt; &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;n &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;        &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;imprimare &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;un &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;final &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;        &lt;span class=&quot;n&quot;&gt;a &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;b &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;b &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;a &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;+ &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;b &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;imprimare &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;() &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# acum apela funcția tocmai am definit: &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;...&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;fib &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2000 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&quot;index-1&quot; style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Cuvântul cheie&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#def&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;def&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;introduce o funcție&amp;nbsp;&lt;/span&gt;&lt;em&gt;definiție&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acesta trebuie urmat de numele funcției și de lista paranteză a parametrilor formali.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Instrucțiunile care formează corpul funcției încep la următoarea linie și trebuie să fie indentate.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Prima declarație a corpului funcției poate fi, opțional, un literal șir;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;acest șir literal este șirul de documentare al funcției sau&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em class=&quot;dfn&quot;&gt;docstring&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;(Mai multe despre docstrings pot fi găsite în secțiunea&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/controlflow.html#tut-docstrings&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em&gt;Documentation Strings&lt;/em&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.) Există instrumente care folosesc docstrings pentru a produce automat documente online sau imprimate sau pentru a permite utilizatorului să navigheze interactiv prin cod;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;este o practică bună să includeți docstrings în codul pe care îl scrieți, așa că faceți un obicei.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;em&gt;Executarea&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;unei funcții introduce un nou tabel de&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;simboluri folosite pentru variabilele locale ale funcției.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Mai precis, toate alocările variabile ale unei funcții stochează valoarea în tabela simbolurilor locale;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;în timp ce referințele variabile se uită prima dată în tabela simbolurilor locale, apoi în tabelele cu simboluri locale ale funcțiilor de închidere, apoi în tabelul simbolurilor globale și, în final, în tabelul cu numele încorporate.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Astfel, variabilele globale nu pot fi atribuite direct unei valori în cadrul unei funcții (cu excepția cazului în care sunt menționate într-o&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;instrucțiune&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/simple_stmts.html#global&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;globală&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;), deși pot fi menționate.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Parametrii reali (argumente) la un apel funcțional sunt introduse în tabelul simbolului local al funcției numite atunci când este apelată;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;astfel, argumentele sunt transmise prin&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;apel prin valoare&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;(unde&amp;nbsp;&lt;/span&gt;&lt;em&gt;valoarea&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este întotdeauna o&amp;nbsp;&lt;/span&gt;&lt;em&gt;referință de&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;obiect&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;, nu valoarea obiectului).&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;footnote-reference&quot; href=&quot;https://docs.python.org/3.3/tutorial/controlflow.html#id2&quot; id=&quot;id1&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;[1]&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;Când o funcție apelează o altă funcție, este creată o nouă tabelă de simboluri locale pentru acel apel.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;O definiție a funcției introduce numele funcției în tabela simbolică curentă.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Valoarea numelui funcției are un tip care este recunoscut de către interpret ca o funcție definită de utilizator.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Această valoare poate fi atribuită unui alt nume care poate fi folosit și ca o funcție.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest lucru servește ca un mecanism general de redenumire:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;fib &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&amp;lt;function fib la 10042ed0&amp;gt; &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;f &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;fib &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;f &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;100 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;0 1 1 2 3 5 8 13 21 34 55 89&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Venind din alte limbi, s-ar putea să vă obiectați că&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;fibra&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;nu este o funcție, ci o procedură, deoarece nu revine o valoare.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De fapt, chiar și&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;funcții fără&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/simple_stmts.html#return&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;întoarcere&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;declarație returnează o valoare, chiar dacă una destul de&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;plictisitoare.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Această valoare se numește&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Niciuna&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;(este un nume încorporat).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Scrierea valorii&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Niciunul nu&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este în mod normal suprimat de interpret dacă ar fi singura valoare scrisă.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Puteți vedea dacă doriți cu adevărat să utilizați&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#print&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;Imprimare&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;print ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;fib &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;0 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;fib &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;0 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;Nici unul&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Este simplu să scrieți o funcție care returnează o listă cu numerele seriei Fibonacci, în loc să o tipăriți:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;def &lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;fib2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;n &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt; &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# returnați seria Fibonacci până la n &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;sd&quot; style=&quot;color: #4070a0; font-style: italic;&quot;&gt;&quot;&quot; &quot;Returnați o listă care conține seria Fibonacci până la n.&quot; &quot; &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;n&quot;&gt;result &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[] &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;n&quot;&gt;a &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;b &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;0 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... în &lt;/span&gt;    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;timp ce &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;o &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&amp;lt; &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;n &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;        &lt;span class=&quot;n&quot;&gt;rezultat &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;append &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;    &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# a se vedea mai jos &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;        &lt;span class=&quot;n&quot;&gt;a &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;b &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;b &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;a &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;+ &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;b &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span style=&quot;vertical-align: inherit;&quot;&gt;rezultatul &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;returnat &lt;/span&gt; &lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;...&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;f100 &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;fib2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;100 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;    &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# numesc &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;F100 &lt;/span&gt;                &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# scrie rezultatul &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;[0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest exemplu, ca de obicei, demonstrează câteva noi caracteristici Python:&lt;/span&gt;&lt;/div&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/simple_stmts.html#return&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Retur&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;Declarația revine cu o valoare dintr -&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;o funcție.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/simple_stmts.html#return&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;întoarcere&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;fără un argument expresie returnează&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Niciuna&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Falling off de la sfârșitul unei funcții, de asemenea, returnează&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Nici unul&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Instrucțiunea&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;result.append (a)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;apelează o&amp;nbsp;&lt;/span&gt;&lt;em&gt;metodă&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;a&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;rezultatului&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;obiectului listă&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;O metodă este o funcție care &quot;aparține&quot; unui obiect și este numită&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;obj.methodname&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, unde&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;obj&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;este un obiect (aceasta poate fi o expresie), iar&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;methodname&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este numele unei metode care este definită de tipul obiectului.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Diferitele tipuri definesc diferite metode.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Metodele de diferite tipuri pot avea același nume fără a cauza ambiguități.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;(Este posibil să definiți propriile tipuri de obiecte și metode, folosind&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;clase&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, vedeți&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#tut-classes&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em&gt;Clase&lt;/em&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;) Metoda&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;append ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;prezentată în exemplu este definită pentru obiectele din listă;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;adaugă un nou element la sfârșitul listei.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În acest exemplu este echivalent cu&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;rezultatul&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;=&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;rezultat&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;+&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;[a]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, dar mai eficient.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 25.6px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;4.7.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Mai multe despre definirea funcțiilor&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/controlflow.html#more-on-defining-functions&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la această titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; id=&quot;more-on-defining-functions&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;span id=&quot;tut-defining&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De asemenea, este posibil să se definească funcții cu un număr variabil de argumente.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Există trei forme care pot fi combinate.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/h1&gt;
&lt;h3 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 22.4px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;4.7.1.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Valori implicite ale argumentelor&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/controlflow.html#default-argument-values&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la această titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;div class=&quot;section&quot; id=&quot;default-argument-values&quot;&gt;
&lt;span id=&quot;tut-defaultargs&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Forma cea mai utilă este să specificați o valoare implicită pentru unul sau mai multe argumente.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Aceasta creează o funcție care poate fi apelată cu mai puține argumente decât este definită pentru a permite.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;def &lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;ask_ok &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;promptă &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;reîncearcă &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;4 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;plângere &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;Da sau nu, te rog!&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): în &lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;timp ce &lt;/span&gt; &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;Adevărat &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;OK &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;intrare &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;solicitare &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
        &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;dacă este &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;OK &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;y&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;voi&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;da&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
            &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;întoarce &lt;/span&gt; &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;Adevărat &lt;/span&gt;
        &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;dacă &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ok &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;n&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;nu&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;nop&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;nope&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
            &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;întoarcere &lt;/span&gt; &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;False &lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;retries &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;retries &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;
        &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;dacă &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;retries &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&amp;lt; &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;0 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
            &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;raise &lt;/span&gt; &lt;span class=&quot;ne&quot; style=&quot;color: #007020;&quot;&gt;IOError &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;utilizator necooperant&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
        &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;plângere &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Această funcție poate fi apelată în mai multe moduri:&lt;/span&gt;&lt;/div&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;precizându -se&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;numai argumentul obligatoriu:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;ask_ok ( „Nu&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;ai&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;într -&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;adevăr&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;doriți&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;să&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;renunțați?“)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/li&gt;
&lt;li style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;oferind unul dintre argumentele opționale:&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;ask_ok ( „OK&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pentru a&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;suprascrie&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;? fișierul“,&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;2)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/li&gt;
&lt;li style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sau chiar da toate argumentele:&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;ask_ok ( „OK&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pentru a&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;suprascrie&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;fișierul?“,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;2,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;„Hai&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pe,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;doar&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;da&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sau&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;nu!“)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest exemplu introduce , de&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;asemenea ,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/expressions.html#in&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;în&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;cuvinte cheie.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Aceasta testează dacă o secvență conține o anumită valoare sau nu.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Valorile implicite sunt evaluate în punctul de definire a funcției în domeniul&amp;nbsp;&lt;/span&gt;&lt;em&gt;definitoriu&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, astfel încât&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;n&quot;&gt;i &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;5&lt;/span&gt;

&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;def &lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;f &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;arg &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;arg &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;i &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;6 &lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;f &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;va imprima&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;5&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;strong&gt;Avertisment important:&lt;/strong&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;Valoarea implicită este evaluată o singură dată.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Aceasta face o diferență când implicit este un obiect mutabil, cum ar fi lista, dicționarul sau instanțele majorității clasei.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu, următoarea funcție acumulează argumentele care i-au fost transmise în apelurile următoare:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;def &lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;f &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;L &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[]): &lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;L &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;adăugați &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;returnați &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;L&lt;/span&gt;

&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;f &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)) &lt;/span&gt;
&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;f &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)) &lt;/span&gt;
&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;f &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;3 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Aceasta va fi imprimată&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;3 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă nu doriți ca parola implicită să fie împărțită între apelurile ulterioare, puteți scrie funcția în felul acesta:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;def &lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;f &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;L &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;None &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): în &lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;cazul în care &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;L &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;este &lt;/span&gt; &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;None &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;L &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[] &lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;L &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;adăugați &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;returnați &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;L&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/h1&gt;
&lt;h3 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 22.4px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;4.7.2.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Argumentele pentru cuvinte cheie&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/controlflow.html#keyword-arguments&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la această titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;div class=&quot;section&quot; id=&quot;keyword-arguments&quot;&gt;
&lt;span id=&quot;tut-keywordargs&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Funcțiile pot fi de asemenea apelate folosind&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/glossary.html#term-keyword-argument&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em class=&quot;xref std std-term&quot;&gt;argumentele de cuvinte cheie&lt;/em&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;ale formulei&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;kwarg = value&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu, următoarea funcție:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;def &lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;papagal &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;tensiune &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;starea &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;o rigid&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;acțiune &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;Voom&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;tip &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;norvegian albastru&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;Print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;- Acest papagal nu&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;acțiune &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sfârșitul &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) de &lt;/span&gt;
    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;imprimare &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;„dacă ați a &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pus“ &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;tensiune &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;volți prin ea&quot;. &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;Print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;- penaj Lovely, a&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, de &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;tip &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;- e&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;stat &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;!&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;acceptă un argument necesar (&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;tensiune&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;) și trei argumente opționale (&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;stare&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;,&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;acțiune&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;tip&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Această funcție poate fi apelată în oricare din următoarele moduri:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;n&quot;&gt;papagal &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1000 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;                                          &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# 1 pozițional argument &lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;papagal &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;tensiune &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1000 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;                                  &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# 1 cuvânt cheie argument &lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;papagal &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;tensiune &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1000000 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;acțiune &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;VOOOOOM&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;             &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# 2 argumente cuvânt cheie &lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;papagal &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;acțiune &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;VOOOOOM&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;tensiune &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1000000 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;             &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# 2 argumente cuvinte cheie &lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;papagal &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;un milion&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;lipsă de viață&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;salt&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;         &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;argumente &lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;pozitive &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;# 3 &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;papagal &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;o mie&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;stat &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;împingând margaretele&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;  &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# 1 pozițional, 1 cuvânt cheie&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;dar toate apelurile următoare ar fi nevalide:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;n&quot;&gt;papagal &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;() &lt;/span&gt;                     &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# necesar lipsește argumentul &lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;papagal &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;tensiune &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt;&lt;span class=&quot;mf&quot; style=&quot;color: #208050;&quot;&gt;5,0 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;mort&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;  &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;# Argumentul de bază &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;non-cuvânt cheie după un argument cuvânt cheie &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;papagal &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;110 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;tensiune &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;220 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;     &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# valoarea duplicat pentru același argument &lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;papagal &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;actor &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;John Cleese&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;  &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;argument argument # necunoscut&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Într-un apel pentru funcții, argumentele cuvintelor cheie trebuie să respecte argumentele poziționale.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Toate argumentele de cuvinte cheie trecute trebuie să se potrivească cu unul dintre argumentele acceptate de funcție (de exemplu,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;actorul&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;nu este un argument valid pentru&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;funcția de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;papagal&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;) și ordinea lor nu este importantă.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest lucru include și argumente non-opționale (de exemplu,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;papagalul (tensiunea = 1000)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este valabil și).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Nici un argument nu poate primi o valoare mai mult decât o dată.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Iată un exemplu care nu reușește din cauza acestei restricții:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;Funcția &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;def &lt;/span&gt; &lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;( &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;a &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;): &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;... &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pass &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;... &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;funcția &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;( &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;0 &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;, &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;a &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;= &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;0 &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;) &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;gt&quot; style=&quot;color: #0044dd;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Traceback (ultimul apel ultim): &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
  Fișier &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&quot;&amp;lt;stdin&amp;gt;&quot; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;, line &lt;/span&gt;&lt;span class=&quot;m&quot; style=&quot;color: #208050;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;1 &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;, in &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;? &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;gr&quot; style=&quot;color: red;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;TypeError &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;: &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;function () a primit mai multe valori pentru argumentul &quot;a&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;gt&quot; style=&quot;color: #0044dd;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;m&quot; style=&quot;color: #208050;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;gr&quot; style=&quot;color: red;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Atunci când&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;este prezent&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;un parametru formal final al formulei&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;**&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, acesta primește un dicționar (vezi&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/stdtypes.html#typesmapping&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em&gt;tipurile de mapare - dict&lt;/em&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;) care conțin toate argumentele cuvintelor cheie, cu excepția celor care corespund unui parametru formal.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Aceasta poate fi combinată cu un parametru formal al formularului&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;*&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;(descris în următoarea subsecțiune) care primește o tuplă care conține argumentele poziționale dincolo de lista de parametri formali.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;(&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;* numele&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;trebuie să aibă loc înainte de&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;** nume&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.) De exemplu, dacă definim o funcție ca aceasta:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;def &lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;cheeseshop &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( un &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;fel &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;* &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;argumente &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;** &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cuvinte cheie &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;Print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;- Ai&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, un &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;fel &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;?&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) de &lt;/span&gt;
    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;imprimare &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&quot;- Îmi pare rău, suntem cu &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;toții în &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;afara&quot; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, un &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;fel &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;arg &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argumente &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
        &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;imprimare &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;arg &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;Print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;-&quot; &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;* &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;40 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;chei &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;sortate &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cuvinte cheie &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;chei &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()) &lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;kw&lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;chei &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
        &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;imprimare &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;kw &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;:&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cuvinte cheie &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;kw &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Ar putea fi numit astfel:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;n&quot;&gt;cheeseshop &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;Limburger&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;Este foarte alergat, domnule&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt;
           &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;Este foarte foarte, foarte fugi, domnule&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt;
           &lt;span class=&quot;n&quot;&gt;magazin &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;Michael Palin&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt;
           &lt;span class=&quot;n&quot;&gt;client &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;John Cleese&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt;
           &lt;span class=&quot;n&quot;&gt;sketch &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;Cheese Shop Sketch&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;și, desigur, ar tipări:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot;&gt;
&lt;pre style=&quot;background-color: #eeffcc; border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;- Ai vreun Limburger?&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
- Îmi pare rău, am ieșit din Limburger&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
E foarte risipit, domnule.&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
Este într-adevăr foarte, foarte curgător, domnule.&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
----------------------------------------&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
client: John Cleese&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
negustor: Michael Palin&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
schiță: Schița magazinelor de brânzeturi&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Rețineți că lista de nume de cuvinte cheie ale cuvintelor cheie este creată prin sortarea rezultatelor&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;metodei&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;tastelor ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;ale dicționarului cuvintelor cheie&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;înainte de a imprima conținutul;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;dacă acest lucru nu se face, ordinea în care sunt imprimate argumentele este nedefinită.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/h1&gt;
&lt;h3 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 22.4px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;4.7.3.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Liste de argumente libere&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/controlflow.html#arbitrary-argument-lists&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la această titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;div class=&quot;section&quot; id=&quot;arbitrary-argument-lists&quot;&gt;
&lt;span id=&quot;tut-arbitraryargs&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div id=&quot;index-2&quot; style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În cele din urmă, opțiunea cea mai puțin frecvent utilizată este de a specifica că o funcție poate fi apelată cu un număr arbitrar de argumente.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Aceste argumente vor fi înfășurate într-o tuplă (a se vedea&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/datastructures.html#tut-tuples&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em&gt;Tupele și secvențele&lt;/em&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Înainte de numărul variabil de argumente, pot apărea zero sau mai multe argumente normale.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;def &lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;write_multiple_items &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;fișier &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;separator &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;* &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;args &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;fișier &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;scrie &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;separator &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;join &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;args &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În mod normal, aceste&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;argumente&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;variadic&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;vor fi ultime în lista parametrilor formali, pentru că vor scoate toate argumentele de intrare rămase care sunt transmise funcției.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Orice parametri formali care apar după&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;parametrul&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;* args&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;sunt argumentele &quot;doar pentru cuvinte cheie&quot;, ceea ce înseamnă că ele pot fi folosite doar ca cuvinte cheie, nu ca argumente poziționale.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;def &lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;concat &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;* &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;args &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sep &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;/&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;   &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;return &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sep &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;se alăture &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;args &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;concat &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;pământ&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;Marte&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;Venus&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39;pământ / Marte / Venus&#39; &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;concat &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;pământ&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;Mars&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;Venus&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sep &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;.&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&quot;earth.mars.venus&quot;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/h1&gt;
&lt;h3 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 22.4px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;4.7.4.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Despachetarea listelor de argumente&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/controlflow.html#unpacking-argument-lists&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la această titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;div class=&quot;section&quot; id=&quot;unpacking-argument-lists&quot;&gt;
&lt;span id=&quot;tut-unpacking-arguments&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Situația inversă apare atunci când argumentele se află deja într-o listă sau în tuplu, dar trebuie să fie despachetate pentru un apel de funcție care necesită argumente poziționale separate.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu, funcția&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/stdtypes.html#range&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;Gama&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;range ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;încorporată așteaptă&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;argumente&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;separate de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;pornire&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și&amp;nbsp;&lt;/span&gt;&lt;em&gt;oprire&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă acestea nu sunt disponibile separat, scrieți apelul pentru funcții cu&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;*&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;-operatorul pentru a despacheta argumentele dintr-o listă sau dintr-o listă:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;lista &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;interval &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;3 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;6 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)) &lt;/span&gt;            &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# apel normal cu argumente distincte &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;[3, 4, 5] &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ARGS &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;3 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;6 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;lista &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;interval &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;* &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;args &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)) &lt;/span&gt;            &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# apel cu argumente despachetat dintr-o listă &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;[3, 4, 5]&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&quot;index-3&quot; style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În același mod, dicționarele pot furniza argumente de cuvinte cheie cu&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;**&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;-operator:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;def &lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;papagal &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;tensiune &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;starea &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;o rigid&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;acțiune &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;Voom&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;Print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;- Acest papagal nu&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;acțiune &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sfârșitul &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;Print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot; dacă puneți &quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;tensiunea &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot; volte prin el &quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;end &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;tipăriți &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot; E&#39;s &quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;state &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;! &quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;...&lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;d&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{ &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;Tensiune&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;patru milioane&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&quot; de &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;stat&quot; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;bleedin&#39; defunctului&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;acțiune&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;VOOM&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;} &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;papagal &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;** &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;d &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;- Acest papagal nu ar Voom dacă ai pus patru milioane de volți prin el. &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;E bleedin a demisionat!&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/h1&gt;
&lt;h3 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 22.4px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;4.7.5.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Expresii Lambda&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/controlflow.html#lambda-expressions&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la această titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;div class=&quot;section&quot; id=&quot;lambda-expressions&quot;&gt;
&lt;span id=&quot;tut-lambda&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Funcțiile anonime mici pot fi create cu&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;cuvântul cheie&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/expressions.html#lambda&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;lambda&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Această funcție returnează suma celor două argumente:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;lambda&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;a,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;b:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;a + b&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Funcțiile Lambda pot fi utilizate ori de câte ori sunt necesare obiecte funcționale.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acestea sunt limitate sintactic la o singură expresie.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Semantic, ele sunt doar zahăr sintactic pentru o definiție normală a funcției.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Asemenea definițiilor de funcții imbricate, funcțiile lambda pot să vadă variabile din domeniul de aplicare care conține:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;def &lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;make_incrementor &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;n &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;întoarcere &lt;/span&gt; &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;lambda &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;+ &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;n &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;f &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;make_incrementor &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;42 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;f &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;0 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;42 &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;f &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;43&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Exemplul de mai sus utilizează o expresie lambda pentru a returna o funcție.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;O altă utilizare este aceea de a transmite o funcție mică ca argument:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;perechi &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;unul&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;), &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;două&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;), &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;3 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;trei&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;), &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;4 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;patru&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)] &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;perechi &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sortare &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cheie &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pereche &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;lambda &lt;/span&gt; &lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;: &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pereche &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;[ &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;1 &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;]) &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;perechi &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;go&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;[(4, &#39;patru&#39;], (1, &#39;unul&#39;),&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/h1&gt;
&lt;h3 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 22.4px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;4.7.6.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Structuri de documentare&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/controlflow.html#documentation-strings&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la această titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;div class=&quot;section&quot; id=&quot;documentation-strings&quot;&gt;
&lt;span id=&quot;tut-docstrings&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div id=&quot;index-4&quot; style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Iată câteva convenții despre conținutul și formatarea șirurilor de documentație.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Prima linie trebuie să fie întotdeauna un rezumat scurt și concis al scopului obiectului.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pentru brevitate, nu ar trebui să precizeze în mod explicit numele sau tipul obiectului, deoarece acestea sunt disponibile prin alte mijloace (cu excepția cazului în care numele se întâmplă să fie un verb care descrie funcționarea unei funcții).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Această linie trebuie să înceapă cu o literă mare și să se încheie cu o perioadă.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă există mai multe linii în șirul de documentație, al doilea rând trebuie să fie necompletat, separând vizual rezumatul de restul descrierii.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Următoarele rânduri ar trebui să fie unul sau mai multe paragrafe care descriu convențiile de apel ale obiectului, efectele sale secundare etc.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Parserul Python nu dezinstalează indentarea de la literali de șir multi-line în Python, așa că instrumentele care procesează documentația trebuie să desprindă indentarea, dacă se dorește.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Aceasta se face folosind următoarea convenție.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Prima linie ne-goală&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;după&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;prima linie a șirului determină cantitatea de indentare pentru întregul șir de documentație.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;(Nu putem folosi prima linie deoarece este în general adiacentă citatelor de deschidere ale șirului, astfel încât indentarea sa nu este vizibilă în literalul șir.) Spațiul alb &quot;echivalent&quot; cu această indentare este apoi desprins de la începutul tuturor liniilor șirului .&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Linii care sunt mai puțin indentate nu trebuie să apară, dar dacă se întâmplă, toate spațiile lor de vârf trebuie să fie dezbrăcate.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Echivalența spațiilor albe trebuie testată după expansiunea filelor (în mod normal, la 8 spații).&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Iată un exemplu de docstring multi-linie:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;def &lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;my_function &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(): &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;sd&quot; style=&quot;color: #4070a0; font-style: italic;&quot;&gt;&quot;&quot; &quot;Nu faceți nimic, ci documentați-l &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;...&lt;/span&gt;&lt;span class=&quot;sd&quot; style=&quot;color: #4070a0; font-style: italic;&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;&lt;span class=&quot;sd&quot; style=&quot;color: #4070a0; font-style: italic;&quot;&gt;    Nu, într-adevăr, nu face nimic. &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;&lt;span class=&quot;sd&quot; style=&quot;color: #4070a0; font-style: italic;&quot;&gt;    &quot;&quot; &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... ... &lt;/span&gt;    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;treceți &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;my_function &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;__doc__ &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;Nu faceți nimic, ci documentați-l.&lt;/span&gt;

&lt;span class=&quot;go&quot;&gt;    Nu, într-adevăr, nu face nimic.&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/h1&gt;
&lt;h3 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 22.4px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;4.7.7.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Annotările funcției&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/controlflow.html#function-annotations&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la această titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;div class=&quot;section&quot; id=&quot;function-annotations&quot;&gt;
&lt;span id=&quot;tut-annotations&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div id=&quot;index-5&quot; style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#function&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em&gt;Funcțiile adnotărilor&lt;/em&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;sunt complet opționale, informații despre metadatele arbitrare despre funcțiile definite de utilizator.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Nici Python, nici biblioteca standard nu utilizează adnotări de funcții în nici un fel;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;această secțiune arată doar sintaxa.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Proiectele terților pot folosi adnotări de funcții pentru documentare, verificări de tip și alte utilizări.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Adnotările sunt stocate în&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;atributul&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;xref py py-attr docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;__annotations__&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;al funcției ca dicționar și nu au efect asupra niciunei alte părți a funcției.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Adnotările adnotărilor sunt definite după un nume de parametru printr-o colonă, urmată de o expresie evaluând valoarea adnotării.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Returnarea adnotărilor este definită printr-un literal&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, urmat de o expresie, între lista de parametri și colon care denotă sfârșitul&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;instrucțiunii&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#def&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;def&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Următorul exemplu are un argument pozițional, un argument cheie și valoarea returnată adnotată cu nonsens:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;def &lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;f &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sunca &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;42 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ouă &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;int &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&#39;spam - &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;ului&#39; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;-&amp;gt; &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;Nimic de văzut aici&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;Print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;Adnotările:&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;f &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;__annotations__ &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;Print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;Argumente:&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;șuncă &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ouă &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;f &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;minunat&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;adnotărilor: { &#39;ouă&#39;: &amp;lt;clasa &#39;int&#39;&amp;gt;, &#39;return&#39;: &#39;Nimic de văzut aici&#39;, &#39;șuncă&#39;: 42} &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;Argumente:minunat spam&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 25.6px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;4.8.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Intermezzo: Stilul de codificare&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/controlflow.html#intermezzo-coding-style&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la această titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; id=&quot;intermezzo-coding-style&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;span id=&quot;tut-codingstyle&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div id=&quot;index-6&quot; style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acum că sunteți pe punctul de a scrie mai multe piese mai complexe de Python, este un moment potrivit să vorbiți despre&amp;nbsp;&lt;/span&gt;&lt;em&gt;stilul de codare&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Cele mai multe limbi pot fi scrise (sau mai concise,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;formatate&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;) în diferite stiluri;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;unele sunt mai ușor de citit decât altele.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;A face ușor pentru alții să vă citească codul este întotdeauna o idee bună, și adoptarea unui stil de codare frumos ajută extraordinar pentru asta.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pentru Python,&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;target&quot; id=&quot;index-7&quot;&gt;&lt;/span&gt;&lt;a class=&quot;pep reference external&quot; href=&quot;http://www.python.org/dev/peps/pep-0008&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;strong&gt;PEP 8&lt;/strong&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;a apărut ca ghid de stil pe care majoritatea proiectelor respectă;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;promovează un stil de codare foarte lizibil și plăcut pentru ochi.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Fiecare dezvoltator Python ar trebui să o citească la un moment dat;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;aici sunt cele mai importante puncte extrase pentru tine:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;div class=&quot;first&quot; style=&quot;line-height: 22.4px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Utilizați indentare cu 4 spații și nu există file.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;4 spații sunt un compromis bun între indentarea mică (permite o adâncime de cuibare mai mare) și o indentare mare (mai ușor de citit).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Filele introduc confuzie și sunt cel mai bine evitate.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;div class=&quot;first&quot; style=&quot;line-height: 22.4px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Înfășurați linii astfel încât să nu depășească 79 de caractere.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest lucru ajută utilizatorii cu afișaje mici și face posibilă existența mai multor fișiere de coduri pe ecranele mai mari.&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;div class=&quot;first&quot; style=&quot;line-height: 22.4px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Utilizați linii goale pentru a separa funcțiile și clasele și blocurile mai mari de coduri din interiorul funcțiilor.&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;div class=&quot;first&quot; style=&quot;line-height: 22.4px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Când este posibil, puneți comentariile pe o linie proprie.&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;div class=&quot;first&quot; style=&quot;line-height: 22.4px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Utilizați docstrings.&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;div class=&quot;first&quot; style=&quot;line-height: 22.4px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Utilizați spațiile în jurul operatorilor și după virgule, dar nu direct în interiorul bracketing constructe:&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;a&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;=&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;f (1,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;2)&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;+&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;g (3,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;4)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;div class=&quot;first&quot; style=&quot;line-height: 22.4px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Denumiți cursurile și funcțiile în mod consecvent;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;convenția este de a folosi&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;CamelCase&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;pentru clase și&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;lower_case_with_underscores&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;pentru funcții și metode.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Utilizați întotdeauna&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sine&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;ca nume pentru primul argument al metodei (consultați&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#tut-firstclasses&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em&gt;A First Look at Classes&lt;/em&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;pentru mai multe despre clase și metode).&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;div class=&quot;first&quot; style=&quot;line-height: 22.4px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Nu utilizați codificări fanteziste dacă codul dvs. &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;este destinat să fie utilizat în medii internaționale.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Python implicit, UTF-8, sau chiar simplu ASCII funcționează cel mai bine în orice caz.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;div class=&quot;first&quot; style=&quot;line-height: 22.4px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De asemenea, nu utilizați caractere non-ASCII în identificatori dacă există doar cel mai mic șansă ca persoanele care vorbesc o limbă diferită să citească sau să mențină codul.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;rubric&quot; style=&quot;font-weight: bold; line-height: 22.4px; margin-top: 30px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Notă de subsol&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table class=&quot;docutils footnote&quot; frame=&quot;void&quot; id=&quot;id2&quot; rules=&quot;none&quot; style=&quot;border-collapse: collapse; border-radius: 3px; border: 0px; margin-bottom: 10px; margin-top: 10px; min-width: 20%;&quot;&gt;&lt;colgroup&gt;&lt;col class=&quot;label&quot;&gt;&lt;/col&gt;&lt;col&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;tbody valign=&quot;top&quot;&gt;
&lt;tr&gt;&lt;td class=&quot;label&quot; style=&quot;border-radius: 3px; border: 0px; padding: 0.3em 0.5em;&quot;&gt;&lt;a class=&quot;fn-backref&quot; href=&quot;https://docs.python.org/3.3/tutorial/controlflow.html#id1&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;[1]&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;border-radius: 3px; border: 0px; padding: 0.3em 0.5em;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De fapt,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt; apelul după referința obiectului &lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;ar fi o descriere mai bună, deoarece dacă un obiect mutabil este trecut, apelantul va vedea orice schimbare pe care apelantul o face (elementele introduse în listă). &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Sursa:&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;a href=&quot;https://docs.python.org/3.3/tutorial/classes.html&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;https://docs.python.org/3.3/tutorial/classes.html&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/h1&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://infotestpc.blogspot.com/feeds/6738409679269996304/comments/default' title='Postare comentarii'/><link rel='replies' type='text/html' href='http://infotestpc.blogspot.com/2018/01/python-un-lombaj-accesibil-2.html#comment-form' title='0 comentarii'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5038728009841547747/posts/default/6738409679269996304'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5038728009841547747/posts/default/6738409679269996304'/><link rel='alternate' type='text/html' href='http://infotestpc.blogspot.com/2018/01/python-un-lombaj-accesibil-2.html' title='Python un lombaj accesibil '/><author><name>Al Con</name><uri>http://www.blogger.com/profile/17409243868650327707</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAIxRvdVMKDJN8nrCzyIm6YPuJBqRXVX0i1sxRcDgCRnMB5G3ZcvGnSux_4o2G5PmpHn1isxq41XmRUTwDCuggIaLWNw6X8bFTe-uWQtlFB3ZAeFFgarhwxGf-UpbU64LkyjybvXQ5ow/s72-c/Copii.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5038728009841547747.post-1457602723507051215</id><published>2018-01-19T13:28:00.001-08:00</published><updated>2020-12-16T12:00:14.974-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Clase"/><category scheme="http://www.blogger.com/atom/ns#" term="Initiere"/><category scheme="http://www.blogger.com/atom/ns#" term="procesorul"/><category scheme="http://www.blogger.com/atom/ns#" term="programare"/><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><category scheme="http://www.blogger.com/atom/ns#" term="Site"/><title type='text'> Python un limbaj accesibil</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h1 style=&quot;border: 0px; margin: 0px; padding: 0.3em 0px;&quot;&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;background-color: white; clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjETIXWN_Yf2_UWW2QvpsQjOs6Oib0gzTbPdBl7ehwU0sbP1ToBV0k56zH_7YZ5Y1PxznXsmD5UrfOw0NU6iNvarm3HV8fOLXz-lcqU5h5BHQ69GcomTj9fcxjSHOCICNmnjhD7KBbjVQ/s259/images.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;194&quot; data-original-width=&quot;259&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjETIXWN_Yf2_UWW2QvpsQjOs6Oib0gzTbPdBl7ehwU0sbP1ToBV0k56zH_7YZ5Y1PxznXsmD5UrfOw0NU6iNvarm3HV8fOLXz-lcqU5h5BHQ69GcomTj9fcxjSHOCICNmnjhD7KBbjVQ/s0/images.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style=&quot;color: #2b00fe; font-size: medium;&quot;&gt;Python este un limbaj de programare general, versatil și puternic. Este o limbă maternă excelentă, deoarece este concisă și ușor de citit. Orice vrei să faci, Python o poate face. De la dezvoltarea web la învățarea automată până la știința datelor&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/h1&gt;
&lt;div&gt;&lt;span style=&quot;background-color: white; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px;&quot;&gt;Structuri de date&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 16px; text-align: justify; vertical-align: inherit;&quot;&gt;Acest capitol descrie unele lucruri pe care le-ați învățat deja în detaliu și adaugă și câteva lucruri noi.&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 25.6px;&quot;&gt;Mai multe despre Liste&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; id=&quot;more-on-lists&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Tipul de date listă are mai multe metode.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Iată toate metodele de listă a obiectelor:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;dl class=&quot;method&quot; style=&quot;margin-bottom: 15px;&quot;&gt;
&lt;dt&gt;&lt;tt class=&quot;descclassname&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;listă.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;tt class=&quot;descname&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 19.2px; font-weight: bold; padding: 0px 1px;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;adăugați&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;big&gt;(&amp;nbsp;&lt;/big&gt;&lt;em&gt;x&amp;nbsp;&lt;/em&gt;&lt;big&gt;)&lt;/big&gt;&lt;/dt&gt;
&lt;dd style=&quot;line-height: 20.8px; margin-bottom: 10px; margin-left: 30px; margin-top: 3px; text-align: justify;&quot;&gt;&lt;div style=&quot;line-height: 22.4px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Adăugați un element la sfârșitul listei.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Echivalent cu&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;o [len (a):]&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;=&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;[x]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;/dd&gt;&lt;/dl&gt;
&lt;dl class=&quot;method&quot; style=&quot;margin-bottom: 15px;&quot;&gt;
&lt;dt&gt;&lt;tt class=&quot;descclassname&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;listă.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;tt class=&quot;descname&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 19.2px; font-weight: bold; padding: 0px 1px;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;extinde&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;big&gt;(&amp;nbsp;&lt;/big&gt;&lt;em&gt;L&amp;nbsp;&lt;/em&gt;&lt;big&gt;)&lt;/big&gt;&lt;/dt&gt;
&lt;dd style=&quot;line-height: 20.8px; margin-bottom: 10px; margin-left: 30px; margin-top: 3px; text-align: justify;&quot;&gt;&lt;div style=&quot;line-height: 22.4px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Extindeți lista adăugând toate elementele din lista dată.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Echivalent cu&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;un [len (a):]&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;=&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;L&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;/dd&gt;&lt;/dl&gt;
&lt;dl class=&quot;method&quot; style=&quot;margin-bottom: 15px;&quot;&gt;
&lt;dt&gt;&lt;tt class=&quot;descclassname&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;listă.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;tt class=&quot;descname&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 19.2px; font-weight: bold; padding: 0px 1px;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;inserați&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;big&gt;(&amp;nbsp;&lt;/big&gt;&lt;em&gt;i&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;,&amp;nbsp;&lt;/span&gt;&lt;em&gt;x&amp;nbsp;&lt;/em&gt;&lt;big&gt;)&lt;/big&gt;&lt;/dt&gt;
&lt;dd style=&quot;line-height: 20.8px; margin-bottom: 10px; margin-left: 30px; margin-top: 3px; text-align: justify;&quot;&gt;&lt;div style=&quot;line-height: 22.4px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Introduceți un element într-o poziție dată.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Primul argument este indexul elementului înaintea căruia se introduce, astfel încât&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;a.insert (0,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;x) se&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;inserează în partea din față a listei și&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;a.insert (len (a),&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;x)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este echivalent cu&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;a.append ( x)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;/dd&gt;&lt;/dl&gt;
&lt;dl class=&quot;method&quot; style=&quot;margin-bottom: 15px;&quot;&gt;
&lt;dt&gt;&lt;tt class=&quot;descclassname&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;listă.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;tt class=&quot;descname&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 19.2px; font-weight: bold; padding: 0px 1px;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;eliminați&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;big&gt;(&amp;nbsp;&lt;/big&gt;&lt;em&gt;x&amp;nbsp;&lt;/em&gt;&lt;big&gt;)&lt;/big&gt;&lt;/dt&gt;
&lt;dd style=&quot;line-height: 20.8px; margin-bottom: 10px; margin-left: 30px; margin-top: 3px; text-align: justify;&quot;&gt;&lt;div style=&quot;line-height: 22.4px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Eliminați primul element din lista a cărei valoare este&amp;nbsp;&lt;/span&gt;&lt;em&gt;x&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Este o eroare dacă nu există un astfel de element.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/dd&gt;&lt;/dl&gt;
&lt;dl class=&quot;method&quot; style=&quot;margin-bottom: 15px;&quot;&gt;
&lt;dt&gt;&lt;tt class=&quot;descclassname&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;listă.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;tt class=&quot;descname&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 19.2px; font-weight: bold; padding: 0px 1px;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pop&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;big&gt;(&amp;nbsp;&lt;/big&gt;&lt;span class=&quot;optional&quot; style=&quot;font-size: 1.3em;&quot;&gt;[&amp;nbsp;&lt;/span&gt;&lt;em&gt;i&amp;nbsp;&lt;/em&gt;&lt;span class=&quot;optional&quot; style=&quot;font-size: 1.3em;&quot;&gt;]&amp;nbsp;&lt;/span&gt;&lt;big&gt;)&lt;/big&gt;&lt;/dt&gt;
&lt;dd style=&quot;line-height: 20.8px; margin-bottom: 10px; margin-left: 30px; margin-top: 3px; text-align: justify;&quot;&gt;&lt;div style=&quot;line-height: 22.4px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Scoateți articolul din poziția dată din listă și returnați-l.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă nu este specificat niciun index,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;a.pop ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;elimină și returnează ultimul element din listă.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;(Parantezele pătrate în jurul valorii de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;i&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;în semnătura metodei indică faptul că parametrul este opțional, nu că trebuie să introduceți paranteze pătrate în acea poziție. Veți vedea această notație frecvent în Python Library Reference.)&lt;/span&gt;&lt;/div&gt;
&lt;/dd&gt;&lt;/dl&gt;
&lt;dl class=&quot;method&quot; style=&quot;margin-bottom: 15px;&quot;&gt;
&lt;dt&gt;&lt;tt class=&quot;descclassname&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;listă.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;tt class=&quot;descname&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 19.2px; font-weight: bold; padding: 0px 1px;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;clar&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;big&gt;(&amp;nbsp;&lt;/big&gt;&lt;big&gt;)&lt;/big&gt;&lt;/dt&gt;
&lt;dd style=&quot;line-height: 20.8px; margin-bottom: 10px; margin-left: 30px; margin-top: 3px; text-align: justify;&quot;&gt;&lt;div style=&quot;line-height: 22.4px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Eliminați toate elementele din listă.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Echivalent cu&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;del&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;a [:]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;/dd&gt;&lt;/dl&gt;
&lt;dl class=&quot;method&quot; style=&quot;margin-bottom: 15px;&quot;&gt;
&lt;dt&gt;&lt;tt class=&quot;descclassname&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;listă.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;tt class=&quot;descname&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 19.2px; font-weight: bold; padding: 0px 1px;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;index&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;big&gt;(&amp;nbsp;&lt;/big&gt;&lt;em&gt;x&amp;nbsp;&lt;/em&gt;&lt;big&gt;)&lt;/big&gt;&lt;/dt&gt;
&lt;dd style=&quot;line-height: 20.8px; margin-bottom: 10px; margin-left: 30px; margin-top: 3px; text-align: justify;&quot;&gt;&lt;div style=&quot;line-height: 22.4px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Returnați indexul în lista primului element a cărui valoare este&amp;nbsp;&lt;/span&gt;&lt;em&gt;x&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Este o eroare dacă nu există un astfel de element.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/dd&gt;&lt;/dl&gt;
&lt;dl class=&quot;method&quot; style=&quot;margin-bottom: 15px;&quot;&gt;
&lt;dt&gt;&lt;tt class=&quot;descclassname&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;listă.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;tt class=&quot;descname&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 19.2px; font-weight: bold; padding: 0px 1px;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;număr&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;big&gt;(&amp;nbsp;&lt;/big&gt;&lt;em&gt;x&amp;nbsp;&lt;/em&gt;&lt;big&gt;)&lt;/big&gt;&lt;/dt&gt;
&lt;dd style=&quot;line-height: 20.8px; margin-bottom: 10px; margin-left: 30px; margin-top: 3px; text-align: justify;&quot;&gt;&lt;div style=&quot;line-height: 22.4px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Reveniți de câte ori&amp;nbsp;&lt;/span&gt;&lt;em&gt;x&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;apare în listă.&lt;/span&gt;&lt;/div&gt;
&lt;/dd&gt;&lt;/dl&gt;
&lt;dl class=&quot;method&quot; style=&quot;margin-bottom: 15px;&quot;&gt;
&lt;dt&gt;&lt;tt class=&quot;descclassname&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;listă.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;tt class=&quot;descname&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 19.2px; font-weight: bold; padding: 0px 1px;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sort&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;big&gt;(&amp;nbsp;&lt;/big&gt;&lt;big&gt;)&lt;/big&gt;&lt;/dt&gt;
&lt;dd style=&quot;line-height: 20.8px; margin-bottom: 10px; margin-left: 30px; margin-top: 3px; text-align: justify;&quot;&gt;&lt;div style=&quot;line-height: 22.4px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Sortați elementele din listă în loc.&lt;/span&gt;&lt;/div&gt;
&lt;/dd&gt;&lt;/dl&gt;
&lt;dl class=&quot;method&quot; style=&quot;margin-bottom: 15px;&quot;&gt;
&lt;dt&gt;&lt;tt class=&quot;descclassname&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;listă.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;tt class=&quot;descname&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 19.2px; font-weight: bold; padding: 0px 1px;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;invers&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;big&gt;(&amp;nbsp;&lt;/big&gt;&lt;big&gt;)&lt;/big&gt;&lt;/dt&gt;
&lt;dd style=&quot;line-height: 20.8px; margin-bottom: 10px; margin-left: 30px; margin-top: 3px; text-align: justify;&quot;&gt;&lt;div style=&quot;line-height: 22.4px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Inversați elementele din listă în loc.&lt;/span&gt;&lt;/div&gt;
&lt;/dd&gt;&lt;/dl&gt;
&lt;dl class=&quot;method&quot; style=&quot;margin-bottom: 15px;&quot;&gt;
&lt;dt&gt;&lt;tt class=&quot;descclassname&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;listă.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;tt class=&quot;descname&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 19.2px; font-weight: bold; padding: 0px 1px;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;copie&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;big&gt;(&amp;nbsp;&lt;/big&gt;&lt;big&gt;)&lt;/big&gt;&lt;/dt&gt;
&lt;dd style=&quot;line-height: 20.8px; margin-bottom: 10px; margin-left: 30px; margin-top: 3px; text-align: justify;&quot;&gt;&lt;div style=&quot;line-height: 22.4px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Returnați o copie superioară a listei.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Echivalent cu&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;un [:]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;/dd&gt;&lt;/dl&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Un exemplu care utilizează majoritatea metodelor listă:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;mf&quot; style=&quot;color: #208050;&quot;&gt;66,25 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;333 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;333 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mf&quot; style=&quot;color: #208050;&quot;&gt;1234,5 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Conta &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;333 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;), &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;un &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Conta &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mf&quot; style=&quot;color: #208050;&quot;&gt;66,25 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;), &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;un &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Număr &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;x&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;2 1 0 &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;inserați &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;- &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;adăuga &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;333 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;[66.25, 333, -1, 333, 1, 1234.5, 333] &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;index &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;333 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;1 &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;eliminați &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;333 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;[66.25, -1, 333, 1, 1234.5, 333] &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;inversă &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;() &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;[333, 1234.5, 1, 333, -1, 66.25] &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sortare &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;() &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;[-1, 1, 66.25, 333, 333, 1234.5]&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;S-ar putea să fi observat că metode cum ar fi&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;inserarea&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;,&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;ștergerea&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;sau&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sortarea&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;care modifică lista nu au nici o valoare returnată imprimată - acestea returnează&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Niciuna&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;footnote-reference&quot; href=&quot;https://docs.python.org/3.3/tutorial/datastructures.html#id3&quot; id=&quot;id1&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;[1]&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;Acesta este un principiu de proiectare pentru toate structurile de date mutabile din Python.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;/h1&gt;&lt;h3 dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #050505; font-family: Arial; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-family: Arial; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 400; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;a href=&quot;https://mateisoscel.blogspot.com/2020/12/ce-sa-mai-citim.html&quot; style=&quot;font-family: Arial; font-weight: 400; text-decoration-line: none; white-space: pre;&quot;&gt;Ce să mai citim?&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/h1&gt;&lt;h1 style=&quot;border: 0px; margin: 0px; padding: 0.3em 0px;&quot;&gt;&lt;div&gt;&lt;span id=&quot;docs-internal-guid-f086038b-7fff-40af-27cd-22ab24d1c28a&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;ol style=&quot;margin-bottom: 0px; margin-top: 0px;&quot;&gt;&lt;li dir=&quot;ltr&quot; style=&quot;color: #434343; font-family: Arial; font-size: 14pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #050505; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;https://alecscon.blogspot.com/2012/08/robot-pe-marte.html&quot; style=&quot;font-size: 10pt; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 13.5pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Ne pregătim pentru Marte&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;color: #050505; font-family: Arial; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;https://alecscon.blogspot.com/2012/08/robot-pe-marte_29.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 13.5pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Robot pe Marte&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;color: #050505; font-family: Arial; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;font-family: Arial; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;a href=&quot;https://mateisoscel.blogspot.com/2020/12/ce-sa-mai-citim.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Ce să mai citim?&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;font-family: Arial; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;a href=&quot;https://anunturigratuitenet.blogspot.com/2012/09/specialisti-in-domeniul-it.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Tatăl fondator al Uniunii Europene.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;font-family: Arial; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;a href=&quot;https://alecscon.blogspot.com/2013/01/colonizarea-de-pe-marte.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Colonizarea de pe Marte !&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;font-family: Arial; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #050505; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;https://alecscon.blogspot.com/2012/08/robot-pe-marte.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Ne pregătim pentru Marte&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;font-family: Arial; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;a href=&quot;https://alecscon.blogspot.com/2012/08/robot-pe-marte.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Colonizarea Marte poate determina umanitatea să-și modifice ADN-ul ?&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;color: #050505; font-family: Arial; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;a href=&quot;https://blogulucovid.blogspot.com/2020/12/cine-mai-uraste-sa-poarte-o-masca.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Cine mai urăște să poarte mască?&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/h1&gt;
&lt;h3 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 22.4px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;5.1.1.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Utilizarea listelor ca stive&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/datastructures.html#using-lists-as-stacks&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;div class=&quot;section&quot; id=&quot;using-lists-as-stacks&quot;&gt;&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Metodele din listă fac foarte ușor utilizarea unei liste ca stiva, unde ultimul element adăugat este primul element preluat (&quot;last-in, first-out&quot;).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pentru a adăuga un element în partea de sus a stivei, utilizați&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;atașați ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pentru a prelua un element din partea de sus a stivei, folosiți&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pop ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;fără un index explicit.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;stivă &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;3 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;4 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;5 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;stivă &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;adăugați &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;6 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;stivă &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;adăugați &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;7 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;stivă &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;[3, 4, 5, 6, 7] &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;stivă &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pop &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;() &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;7 &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;stivă &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;[3, 4, 5, 6] &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;stivă &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pop &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;() &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;6 &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;stivă &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pop &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;() &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;5 &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;stivă &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;[3, 4]&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/h1&gt;
&lt;h3 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 22.4px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;5.1.2.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Utilizarea listelor ca Cozile&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/datastructures.html#using-lists-as-queues&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;div class=&quot;section&quot; id=&quot;using-lists-as-queues&quot;&gt;
&lt;span id=&quot;tut-lists-as-queues&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Este, de asemenea, posibilă utilizarea unei liste ca o coadă, în care primul element adăugat este primul element preluat (&quot;first-in, first-out&quot;);&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;totuși, listele nu sunt eficiente în acest scop.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În timp ce apendicele și pop-urile de la sfârșitul listei sunt rapide, inserarea sau ștampila de la începutul unei liste este lentă (deoarece toate celelalte elemente trebuie să fie deplasate de una).&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pentru a pune în aplicare o coadă, utilizați&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/collections.html#collections.deque&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;collections.deque&quot;&gt;&lt;tt class=&quot;xref py py-class docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;collections.deque&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;care a fost proiectat pentru a avea rapide apendice și apare de la ambele capete.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;kn&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;din &lt;/span&gt; &lt;span class=&quot;nn&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;colecții &lt;/span&gt; &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;import &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;deque &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;queue &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;deque &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;Eric&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;John&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;Michael&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;coadă &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;append &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;Terry&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;           &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# Terry sosește &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;coadă &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;append &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;Graham&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;          &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# Graham sosește &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;coadă &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;popleft &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;() &lt;/span&gt;                 &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# Primul care ajunge acum lasă &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&quot;Eric&quot; &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;coadă &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;                 &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39;John&#39; &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;coadă &lt;/span&gt;                           &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# &lt;/span&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Coada &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;rămasă în ordinea sosirii &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;go&quot;&gt;deque ([&#39;Michael&#39;, &#39;Terry&#39;, &#39;Graham&#39;])&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/h1&gt;
&lt;h3 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 22.4px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;5.1.3.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Lista înțelegerilor&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/datastructures.html#list-comprehensions&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;div class=&quot;section&quot; id=&quot;list-comprehensions&quot;&gt;
&lt;span id=&quot;tut-listcomps&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Lista de înțelegeri oferă o modalitate concisă de a crea liste.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Aplicațiile comune sunt de a face noi liste în care fiecare element este rezultatul unor operații aplicate fiecărui membru al unei alte secvențe sau iterabil sau pentru a crea o subsecventa a acelor elemente care satisfac o anumită condiție.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu, presupunem că vrem să creăm o listă de pătrate, cum ar fi:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pătrate &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[] &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;intervalul &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;10 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;n&quot;&gt;pătrate &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;adăugați &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;** &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pătrate &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;[0, 1, 4, 9, 16, 25, 36, 49, 64, 81]&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Putem obtine acelasi rezultat cu:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;n&quot;&gt;pătrate &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;** &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt; &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;intervalul &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;10 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)]&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Aceasta este, de asemenea, echivalentă cu&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pătratele&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;=&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;listă (hartă (lambda&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;x:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;x ** 2,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;interval (10)))&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, dar este mai concisă și mai lizibilă.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;O înțelegere a listei constă din paranteze care conțin o expresie urmată de o&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;clauză&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#for&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pentru&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, apoi de zero sau mai mult&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#for&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pentru&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;sau în&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#if&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;cazul&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;clauzelor.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Rezultatul va fi o nouă listă care rezultă din evaluarea expresiei în contextul&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;clauzelor&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#for&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;for&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#if&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;if&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;care o urmează.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu, această listcomp combină elementele a două liste dacă nu sunt egale:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt; &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;3 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt; &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;3 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;4 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt; &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;dacă &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;! = &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Y &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;[(1, 3), (1, 4), (2 , 3), (2, 1), (2, 4), (3, 1), (3, 4)]&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;și este echivalent cu:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;fag &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[] &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;3 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]: &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;3 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;4 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]: &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;        &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;dacă &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;! = &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;            &lt;span class=&quot;n&quot;&gt;piepteni &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;atașa &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;piepteni &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;[(1, 3), (1, 4), (2, 3), (2, 1), (2, 4), (3, 1 ), (3, 4)]&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Rețineți cum ordinea&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;instrucțiunilor&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#for&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;for&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#if&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;if&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este aceeași în ambele aceste fragmente.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă expresia este o tuplă (de exemplu,&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;(x,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;y)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;din exemplul anterior), trebuie să fie paranteză.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;vec &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;- &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;4 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;- &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;0 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;4 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;# a &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;crea o nouă listă cu valorile dublate &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;* &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt; &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;vec &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;[-8, -4, 0 , 4, 8] &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# filtrați lista pentru a exclude numerele negative &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x &lt;/span&gt; &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;vec &lt;/span&gt; &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;dacă &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&amp;gt; = &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;0 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;[0, 2, 4] &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# aplică o funcție la toate elementele &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt; &amp;gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;abs &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt; &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;vec &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;[4, 2, 0, 2, 4] &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# apela o metodă pe fiecare element &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;freshfruit &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;banana&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;loganberry&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;fructul pasiunii&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt; &amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;arma &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;benzi &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;() &lt;/span&gt; &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;arme &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;freshfruit &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;[ &#39;banana&#39;, &#39;loganberry&#39;, &#39;fructul pasiunii&#39;] &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;# a &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;crea o listă de 2-tuple ca (număr, pătrat) &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;interval &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;6 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)] &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;[(0, 0), (1, 1), (2, 4), (3, 9), (4, 16), (5, 25)] &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# tensiunea trebuie să fie parantezată, în caz contrar apare o eroare &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;** &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt; &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;intervalul &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;6 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)] &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;  Fișierul &quot;&amp;lt;stdin&amp;gt;&quot;, rândul 1, în? &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;    [x, x ** 2 pentru x în intervalul (6)] &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;               ^ &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;SyntaxError: sintaxa nevalidă &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# aplatizarea unei liste folosind o listă compusă cu două &#39;pentru&#39; &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;vec &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[[ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;3 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;4 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;5 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;6 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;], &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;7 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;8 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;9 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]] &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;num &lt;/span&gt; &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;elem &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;vec &lt;/span&gt; &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;num &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;elem &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;[1, 2, 3, 4, 5, 6, 7, 8, 9]&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Lista comprehensions poate conține expresii complexe și funcții imbricate:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;kn&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;din &lt;/span&gt; &lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;importul de &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;nn&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;matematică &lt;/span&gt; &lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pi &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;[ &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;str &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;( &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;rotund &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;( &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pi &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;, &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;i &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;)) &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pentru &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;i &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;în &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;intervalul &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;( &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;1 &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;, &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;6 &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;)] &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;go&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;[&#39;3.1&#39;, &#39;3.14&#39;, &#39;3.142&#39;, &#39;3.1416&#39; ]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/h1&gt;
&lt;h3 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 22.4px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;5.1.4.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Înțelegeri ale listei încorporate&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/datastructures.html#nested-list-comprehensions&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;div class=&quot;section&quot; id=&quot;nested-list-comprehensions&quot;&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Expresia inițială într-o înțelegere a listei poate fi orice expresie arbitrară, incluzând o altă înțelegere a listei.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Luați în considerare următorul exemplu de matrice 3x4 implementată ca o listă cu 3 liste de lungime 4:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;matrice &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;3 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;4 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;], &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;5 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;6 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;7 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;8 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;], &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;9 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;10 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;11 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;12 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;], &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Următoarea listă de înțelegere va transpune rândurile și coloanele:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[[ &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;rând &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt; &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;rândul &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;matrice &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt; &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;i &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;intervalul &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;4 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)] &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;[[1, 5, 9], [ 8, 12]]&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Așa cum am văzut în secțiunea anterioară, lista listată imbricată este evaluată în contextul&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#for&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pentru&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;care o urmează, deci acest exemplu este echivalent cu:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;transpus &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[] &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;i &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;intervalul &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;4 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;n&quot;&gt;transpus &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;adăugați &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;([ &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;rând &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt; &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;rând &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;matrice &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;transpuse &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;[[1, 5, 9], [2, 6, 10], [ 12]]&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;care, la rândul său, este la fel ca:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;transpus &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[] &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;i &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;raza de acțiune &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;4 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# Următoarele 3 rânduri implementează lista imbricată &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;n&quot;&gt;transposed_row &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[] &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;rândul &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;matrice &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;        &lt;span class=&quot;n&quot;&gt;transposed_row &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;adăugați &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;rând &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;n&quot;&gt;transpus &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;adăugați &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;transposed_row &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;transpus &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;[[1, 5, 9], [2, 6, 10], [3, 7, 11], [4,8,12]]&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În lumea reală, ar trebui să preferați funcțiile încorporate în declarațiile de flux complexe.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Funcția&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#zip&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;zip&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;zip ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;ar face o treabă excelentă pentru acest caz de utilizare:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;lista &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;zip &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;* &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;matrix &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;[(1, 5, 9), (2, 6, 10), (3, 7, 11)&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Consultați&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/controlflow.html#tut-unpacking-arguments&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em&gt;Dezarhivarea listelor de argumente&lt;/em&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;pentru detalii despre asterisc în acest rând.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 25.6px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;5.2.&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/simple_stmts.html#del&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 24.704px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Del&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;Declarația&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/datastructures.html#the-del-statement&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; id=&quot;the-del-statement&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;span id=&quot;tut-del&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Există o modalitate de a elimina un element dintr-o listă în locul indexului său, în locul valorii sale:&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;instrucțiunea&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/simple_stmts.html#del&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;del&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Aceasta diferă de metoda&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pop ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;care returnează o valoare.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Instrucțiunea&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/simple_stmts.html#del&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;del&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;poate fi de asemenea folosită pentru a elimina felii dintr-o listă sau pentru a șterge întreaga listă (ceea ce am făcut mai devreme prin alocarea unei liste goale la felie).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;- &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mf&quot; style=&quot;color: #208050;&quot;&gt;66.25 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;333 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;333 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mf&quot; style=&quot;color: #208050;&quot;&gt;1234,5 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;del &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;a &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;0 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;[1, 66.25, 333, 333, 1234,5] &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;del &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;a &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;4 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;[1, 66.25, 1234.5] &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;del &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;a &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[:] &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;[]&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/simple_stmts.html#del&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;del&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;poate fi, de asemenea, utilizat pentru a șterge variabilele întregi:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;del &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;a&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Referindu-se la denumirea de&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;mai&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;jos este o eroare (cel puțin până când îi este atribuită o altă valoare).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Vom găsi alte utilizări pentru&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/simple_stmts.html#del&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;del&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;mai târziu.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 25.6px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;5.3.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Tupele și secvențe&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/datastructures.html#tuples-and-sequences&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; id=&quot;tuples-and-sequences&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;span id=&quot;tut-tuples&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Am văzut că listele și șirurile au multe proprietăți comune, cum ar fi operațiile de indexare și de tăiere.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acestea sunt două exemple de&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;tipuri de date de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;secvență&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;(vedeți&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/stdtypes.html#typesseq&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em&gt;Tipuri de secvențe - listă, tuplă, interval&lt;/em&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Din moment ce Python este un limbaj în evoluție, pot fi adăugate alte tipuri de date secvențiale.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Există, de asemenea, un alt tip de date standard de secvență:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;tupla&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;O trupă constă dintr-un număr de valori separate prin virgule, de exemplu:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;t &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;12345 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;54321 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;salut!&quot; &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;t &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;0 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;12345 &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;t &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;(12345, 54321, &#39;alo!&#39;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# Tuples poate fi imbricate: &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;u &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;t &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;3 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;4 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;5 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt; &amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;u &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;((12345, 54321, &#39;hello!&#39;), (1, 2, 3, 4, 5)) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# Tuples sunt imuabile: &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;t &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;0 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;88888&lt;/span&gt;
&lt;span class=&quot;gt&quot; style=&quot;color: #0044dd;&quot;&gt;Traceback (cel mai recent apel ultima): &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
  Fișier &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;&quot;&amp;lt;stdin&amp;gt;&quot; &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;, linia &lt;/span&gt;&lt;span class=&quot;m&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;, în &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&amp;lt;modul&amp;gt; &lt;/span&gt;
&lt;span class=&quot;gr&quot; style=&quot;color: red;&quot;&gt;TypeError &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;: &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&#39;tuplu&#39; obiect nu are suport pentru &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;atribuirea element &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# dar ele pot conține obiecte modificabile: &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;v &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;( [ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;3 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;], &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;3 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;v &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;([1, 2, 3], [3, 2, 1]&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;După cum vedeți, pe tuplele de ieșire sunt întotdeauna închise în paranteze, astfel că nopțile imbricate sunt interpretate corect;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;ele pot fi introduse cu sau fără paranteze înconjurătoare, deși adesea paranteze sunt necesare oricum (dacă tuplul face parte dintr-o expresie mai mare).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Nu este posibilă alocarea elementelor individuale ale unei tuple, însă este posibil să se creeze tupluri care conțin obiecte mutabile, cum ar fi liste.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Deși tuplele pot părea similare cu listele, ele sunt adesea folosite în situații diferite și în scopuri diferite.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Tupele sunt&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/glossary.html#term-immutable&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em class=&quot;xref std std-term&quot;&gt;imuabile&lt;/em&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și conțin, de obicei, o secvență eterogenă de elemente care sunt accesate prin despachetare (a se vedea mai târziu în această secțiune) sau indexare (sau chiar prin atribut în cazul&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/collections.html#collections.namedtuple&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;collections.namedtuple&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;numerelor&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Listele sunt&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/glossary.html#term-mutable&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em class=&quot;xref std std-term&quot;&gt;mutabile&lt;/em&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, iar elementele lor sunt, de obicei, omogene și sunt accesate prin iterarea în listă.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;O problemă specială este construirea de tupluri care conțin 0 sau 1 elemente: sintaxa are unele ciudățenii suplimentare pentru a le acomoda.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Gândurile goale sunt construite de o pereche goală de paranteze;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;un tuplu cu un element este construit urmând o valoare cu o virgulă (nu este suficient să închideți o singură valoare în paranteze).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Urât, dar eficace.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;empty &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;() &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;singleton &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;hello&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt;    &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# &amp;lt;- virgula cu note în urmă &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;len &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;gol &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;0 &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;len &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;singleton &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;1 &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;singleton &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;(&#39;hello&#39;,)&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Declarația&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;t&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;=&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;12345,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;54321,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&quot;salut!&quot;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;este un exemplu de&amp;nbsp;&lt;/span&gt;&lt;em&gt;ambalare în tuple&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;: valorile&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;12345&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;,&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;54321&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&quot;salut!&quot;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sunt ambalate împreună într-o tuplă.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Este posibilă și operarea inversă:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;z &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;t&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Aceasta se numește, suficient de adecvat,&amp;nbsp;&lt;/span&gt;&lt;em&gt;despachetarea succesivă&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și funcționează pentru orice secvență din partea dreaptă.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Descărcarea secvențelor necesită existența a numeroase variabile pe partea stângă a semnalului egal, deoarece există elemente în secvență.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Rețineți că atribuirea mai multor este într-adevăr doar o combinație de împachetare tuplă și despachetare succesivă.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 25.6px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;5.4.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Seturi&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/datastructures.html#sets&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; id=&quot;sets&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;span id=&quot;tut-sets&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Python include, de asemenea, un tip de date pentru&amp;nbsp;&lt;/span&gt;&lt;em&gt;seturi&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Un set este o colecție neordonată fără elemente duplicate.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Utilizările de bază includ testarea membrilor și eliminarea intrărilor duplicate.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Setarea obiectelor suportă și operații matematice cum ar fi unirea, intersecția, diferența și diferența simetrică.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Comenzile curry sau funcția&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/stdtypes.html#set&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;a stabilit&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;set ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;pot fi folosite pentru a crea seturi.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Notă: pentru a crea un set gol trebuie să utilizați&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;set ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, nu&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;{}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;acesta din urmă creează un dicționar gol, o structură de date pe care o discutăm în secțiunea următoare.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Iată o scurtă demonstrație:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;coș &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{ &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;apple&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;orange&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;apple&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;pear&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;orange&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;banana&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;} &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;coș &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;                      &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# arată că duplicatele au fost eliminate &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;{ banana &quot;,&quot; pere &quot;,&quot; mere &quot;} &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot; portocaliu &quot; &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;coș &lt;/span&gt;                 &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# rapid de testare a calității de membru &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;Adevărat &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;crabgrass&#39; &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;coș &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;Fals&lt;/span&gt;

&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;# set operații pe Demonstrați scrisori unice de &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;la două cuvinte &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;un &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;set &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;Abracadabra&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;b &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;set &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;alacazam&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;un &lt;/span&gt;                                  &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;scrisori # unic într - &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;un &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;{ &#39;o &#39;,&#39; r &#39;,&#39; b &#39;,&#39; c &#39;,&#39; d &#39;} &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;- &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;b &lt;/span&gt;                              &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# litere într-un, dar nu în b &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;{&#39; r &#39;,&#39; d &#39;,&#39; b &#39;} &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;| &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;b &quot; &lt;/span&gt;                              &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;litere în a sau b &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;{&#39;a&#39;, &#39;c&#39;, &#39;r&#39;, &#39;d&#39;, &#39;b&#39;, &#39;m&#39;, &#39;&lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;                              &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;^ &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;b &lt;/span&gt;                              &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# litere în a sau b, dar nu ambele &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;{&#39;r&#39;, &#39;d&#39;, &#39;b&#39;, &#39;m&#39;, &#39;z&#39;, &#39;l&#39;}&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În mod similar cu&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/datastructures.html#tut-listcomps&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em&gt;înțelegerile din listă&lt;/em&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, sunt de asemenea acceptate înțelegeri setate:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{ &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x &lt;/span&gt; &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;abracadabra&#39; &lt;/span&gt; &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;dacă &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;nu este &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;abc&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;{&#39;r&#39;, &#39;d&#39;}&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 25.6px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;5.5.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dicționare&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/datastructures.html#dictionaries&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; id=&quot;dictionaries&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;span id=&quot;tut-dictionaries&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Un alt tip de date util construit în Python este&amp;nbsp;&lt;/span&gt;&lt;em&gt;dicționarul&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;(consultați&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/stdtypes.html#typesmapping&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em&gt;Tipuri de cartografiere - dict&lt;/em&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dicționarele sunt uneori găsite în alte limbi ca &quot;amintiri asociative&quot; sau &quot;matrice asociative&quot;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Spre deosebire de secvențe, care sunt indexate printr-o serie de numere, dicționarele sunt indexate prin&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;chei&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, care pot fi orice tip imuabil;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;șirurile și numerele pot fi întotdeauna chei.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Tupele pot fi folosite ca chei dacă conțin numai șiruri, numere sau tuple;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;dacă o tuplă conține un obiect mutabil, direct sau indirect, nu poate fi folosit ca o cheie.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Nu puteți utiliza listele ca chei, deoarece listele pot fi modificate în loc utilizând asignări index, alocări slice sau metode cum ar fi&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;append ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;extend ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Cel mai bine este să gândiți un dicționar ca un set neordonat de&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;perechi&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;chei: valoare&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, cu cerința că cheile sunt unice (într-un singur dicționar).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;O pereche de bretele creează un dicționar gol:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;{}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Plasarea unei liste separate de virgulă a perechilor de chei: valoare în cadrul brațelor adaugă cheia inițială: perechi de valori în dicționar;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;acesta este și modul în care sunt scrise dictionarele de ieșire.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Principalele operații dintr-un dicționar sunt stocarea unei valori cu unele chei și extragerea valorii date de tastă.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Este, de asemenea, posibil să ștergeți o pereche cheie: valoare cu&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;del&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă stocați utilizând o cheie deja utilizată, vechea valoare asociată acelei chei este uitată.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Este o eroare să extrageți o valoare utilizând o cheie inexistentă.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Efectuarea unei&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;liste (d.keys ())&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;într-un dicționar returnează o listă a tuturor cheilor folosite în dicționar, în ordine arbitrară (dacă doriți să fie sortată, utilizați în schimb&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sortate (d.keys ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;).&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;footnote-reference&quot; href=&quot;https://docs.python.org/3.3/tutorial/datastructures.html#id4&quot; id=&quot;id2&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;[2]&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pentru a verifica dacă o singură tastă este în dicționar, utilizați&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;cuvântul cheie&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/expressions.html#in&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;în&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Iată un mic exemplu folosind un dicționar:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;tel &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{ &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;jack&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;4098 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;sape&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;4139 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;tel &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;guido&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;4127 &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;tel &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;{&#39;sape&#39;: 4139, &#39;guido&#39; 4098} &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;tel &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;jack&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;4098 &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;del &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;tel &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;SAPE&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;tel &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;Irv&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;4127 &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;tel &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;{ &#39;guido&#39;: 4127, &#39;Irv&#39;: 4127,&#39;jack&#39;: 4098} &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;lista &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;tel &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;chei &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;[ &#39;Irv&#39;, &#39;Guido&#39;, &#39;jack&#39;] &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;sortate &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;tel &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;chei &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;[ &#39;guido&#39;, &#39;Irv&#39;, &#39;jack&#39;] &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;guido&#39; &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;in &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;tel &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;Adevărat &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;Jack&quot; &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;nu este &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;tel &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;Fals&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Constructorul&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/stdtypes.html#dict&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;dict&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;dict ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;construiește dicționare direct din secvențe de perechi cheie-valoare:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;dict &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39; &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;( &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&#39; sape &#39; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;4139 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;), &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39; guido &#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;4127 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;), &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39; jack &#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;4098 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)]) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;{sape&#39; 4139, jack: 4098, guido:&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În plus, înțelegerile dict pot fi folosite pentru a crea dicționare din expresii cheie și valori arbitrare:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{ &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;** &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt; &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;4 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;6 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)} &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;{2: 4, 4: 16, 6: 36}&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Când cheile sunt șiruri simple, uneori este mai ușor să specificați perechi folosind argumentele cuvintelor cheie:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;dict &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sape &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;4139 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;guido &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;4127 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;jack &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;4098 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;{&#39;sape&#39;: 4139, &#39;jack&#39;: 4098, &#39;guido&#39;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 25.6px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;5.6.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Tehnici looping&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/datastructures.html#looping-techniques&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; id=&quot;looping-techniques&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;span id=&quot;tut-loopidioms&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Când se creează buclă prin dicționare, cheia și valoarea corespunzătoare pot fi preluate în același timp folosind metoda&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;items ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;knights &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{ &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;gallahad&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;pur&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;robin&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;curajos&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;} &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;k &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;v &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cavaleri &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;articole &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(): &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;k &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;v &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;gallahad pur și simplu &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;curajos&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Când se trece printr-o secvență, indicele de poziție și valoarea corespunzătoare pot fi preluate în același timp folosind funcția&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#enumerate&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;enumera&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;enumerate ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;i &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;v &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;in &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;enumerate &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;([ &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;tic&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;tac&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;toe&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]): &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;v &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;0 tic &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;1 tac &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;2 toe&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pentru a intra în două sau mai multe secvențe în același timp, intrările pot fi asociate cu funcția&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#zip&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;zip&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;zip ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;întrebări &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;nume&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;quest&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;culoarea preferata&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;răspunsuri &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;Lancelot&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;Sfântul Graal&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;albastru&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;q &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;o &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;ZIP &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;întrebări &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;răspunsuri &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;Print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;Care este {0} este {1}?.&#39; &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;format &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;q &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;a &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Care este numele tău? &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Este lancelot.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Care este misiunea ta? &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acesta este Sfântul Graal. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Care este culoarea ta preferata? &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Este albastru.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pentru a bifa o secvență în sens invers, mai întâi specificați secvența într-o direcție înainte și apoi apelați funcția&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#reversed&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;inversat&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;inversă ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;i &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în sens &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;invers &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;interval &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;10 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)): &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;9 &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;7 &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;5 &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;3 &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;1&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pentru a bifa o secvență în ordinea sortată, utilizați funcția&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#sorted&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;sortate&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sort ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;care returnează o nouă listă sortată, lăsând în același timp sursa neschimbată.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;coș &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;mere&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;orange&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;măr&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;pere&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;orange&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;banana&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;f &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;sortat &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;set &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;coș &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)): &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;f &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;mere &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;banane &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;portocale &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;pere&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pentru a modifica o secvență pe care o repetați în interiorul bucla (de exemplu, pentru a duplica anumite elemente), este recomandat să creați o copie.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Lovitura peste o secvență nu face implicit o copie.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Notatia de felie face ca acest lucru deosebit de convenabil:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cuvinte &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;cat&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;fereastră&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;defenestrate&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;w &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cuvinte &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[:]: &lt;/span&gt;  &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# Faceți buclă pe o copie a unei liste întregi. &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;dacă &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;lămâie &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;w &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&amp;gt; &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;6 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;        &lt;span class=&quot;n&quot;&gt;cuvinte &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;inserați &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;0 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;w &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cuvinte &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;[&#39;defenestrate&#39;, &#39;cat&#39;, &#39;window&#39;, &#39;defenestrate&#39;]&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 25.6px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;5.7.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Mai multe despre condițiile&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/datastructures.html#more-on-conditions&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; id=&quot;more-on-conditions&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;span id=&quot;tut-conditions&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Condițiile utilizate în&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;instrucțiunile de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;timp&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;dacă&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;pot conține orice operatori, nu doar comparații.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Operatorii de&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;comparație&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;în&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;nu&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;în&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;Verificați dacă apare o valoare (nu apare) într -&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;o secvență.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Operatorii&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;este&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;este&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;nu&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;compara dacă două obiecte sunt într -&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;adevăr același obiect;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;acest lucru contează doar pentru obiecte mutabile, cum ar fi listele.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Toți operatorii de comparare au aceeași prioritate, care este mai mică decât cea a tuturor operatorilor numerici.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Comparațiile pot fi înlănțuite.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;un&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;lt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;b&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;==&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;c&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;testează dacă&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;a&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este mai mic decât&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;b&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și în plus&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;b&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este egal cu&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;c&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Comparațiile pot fi combinate folosind operatorii booleani&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;și&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sau&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, iar rezultatul unei comparații (sau al oricărei alte expresii booleene) poate fi negat cu&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;nu&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acestea au priorități mai mici decât operatorii de comparație;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;între ele,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;nu&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;are cea mai mare prioritate și&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sau&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;cea mai mică, astfel încât&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;A&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;și&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;nu&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;B&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sau&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;C&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este echivalent cu&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;(A&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;și&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;(nu&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;B))&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sau&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;C&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Ca întotdeauna, parantezele pot fi folosite pentru a exprima compoziția dorită.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Operatorii booleeni&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;și&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sau sau&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;așa-numiții&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;operatori de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;scurt-circuit&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;: argumentele lor sunt evaluate de la stânga la dreapta și evaluarea se oprește de îndată ce rezultatul este determinat.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu, dacă&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;A&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;C&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;sunt adevărate ,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;dar&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;B&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este fals,&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;A&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;și&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;B&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;și&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;C&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;nu evaluează expresia&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;C&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Atunci când este folosit ca valoare generală și nu ca booleană, valoarea de retur a operatorului de scurt-circuit este ultimul argument evaluat.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Este posibil să se atribuie rezultatul unei comparații sau al altei expresii booleene unei variabile.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu,&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;string1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;string2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;string3 &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;Trondheim&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;Hammer Dance&#39; &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;non_null &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;string1 &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;sau &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;string2 &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;sau &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;string3 &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;non_null &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39;Trondheim&#39;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Rețineți că în Python, spre deosebire de C, atribuirea nu poate apărea în interiorul expresiilor.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Programatorii C ar putea bâzâi despre acest lucru, dar evită o clasă comună de probleme întâlnite în programele C: tastând&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;=&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;într-o expresie când&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;== a&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;fost intenționată.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 25.6px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;5.8.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Compararea secvențelor și a altor tipuri&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/datastructures.html#comparing-sequences-and-other-types&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; id=&quot;comparing-sequences-and-other-types&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;span id=&quot;tut-comparing&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Obiectele de secvență pot fi comparate cu alte obiecte cu același tip de secvență.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Comparația folosește&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;ordonarea&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;lexicografică&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;: mai întâi se compară primele două elemente și dacă acestea diferă, determină rezultatul comparației;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;dacă sunt egale, următoarele două elemente sunt comparate și așa mai departe, până când fiecare secvență este epuizată.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă două elemente care trebuie comparate sunt ele însele secvențe de același tip, comparația lexicografică se face recursiv.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă toate elementele a două secvențe se compară egale, secvențele sunt considerate egale.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă o secvență este o sub-secvență inițială a celeilalte, secvența mai scurtă este cea mai mică (mai mică).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Ordonarea lexicografică pentru șiruri de caractere utilizează numărul codului Unicode pentru a comanda caractere individuale.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Câteva exemple de comparații între secvențe de același tip:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;3 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;              &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&amp;lt; &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;4 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;3 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt;              &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&amp;lt; &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;4 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt;
&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;ABC&#39; &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&amp;lt; &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;C&#39; &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&amp;lt; &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;Pascal&#39; &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&amp;lt; &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;Python&#39; &lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;3 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;4 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;           &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&amp;lt; &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;4 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;                 &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;- &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;3 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;             &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;== &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mf&quot; style=&quot;color: #208050;&quot;&gt;1,0 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mf&quot; style=&quot;color: #208050;&quot;&gt;2,0 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mf&quot; style=&quot;color: #208050;&quot;&gt;3,0 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;aa&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;ab&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)) &lt;/span&gt;   &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&amp;lt; &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;abc&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;a&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;), &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;4 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Rețineți că compararea obiectelor de diferite tipuri cu&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;sau&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este legală, cu condiția ca obiectele să aibă metode de comparare adecvate.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu, tipurile numerice mixte sunt comparate în funcție de valoarea lor numerică, deci 0 este egală cu 0,0, etc. Altfel, în loc să furnizeze o comandă arbitrară, interpretul va ridica o&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;excepție&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/exceptions.html#TypeError&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;Eroare de scris&quot;&gt;&lt;tt class=&quot;xref py py-exc docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;TypeError&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;rubric&quot; style=&quot;font-weight: bold; line-height: 22.4px; margin-top: 30px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Note de subsol&lt;/span&gt;&lt;/div&gt;
&lt;table class=&quot;docutils footnote&quot; frame=&quot;void&quot; id=&quot;id3&quot; rules=&quot;none&quot; style=&quot;border-collapse: collapse; border-radius: 3px; border: 0px; margin-bottom: 10px; margin-top: 10px; min-width: 20%;&quot;&gt;&lt;colgroup&gt;&lt;col class=&quot;label&quot;&gt;&lt;/col&gt;&lt;col&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;tbody valign=&quot;top&quot;&gt;
&lt;tr&gt;&lt;td class=&quot;label&quot; style=&quot;border-radius: 3px; border: 0px; padding: 0.3em 0.5em;&quot;&gt;&lt;a class=&quot;fn-backref&quot; href=&quot;https://docs.python.org/3.3/tutorial/datastructures.html#id1&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;[1]&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;border-radius: 3px; border: 0px; padding: 0.3em 0.5em;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Alte limbi pot returna obiectul mutant, care permite înlănțuirea metodei, cum ar fi&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;d-&amp;gt; inserați (&quot;a&quot;) -&amp;gt; eliminați (&quot;b&quot;) -&amp;gt; sort ();&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table class=&quot;docutils footnote&quot; frame=&quot;void&quot; id=&quot;id4&quot; rules=&quot;none&quot; style=&quot;border-collapse: collapse; border-radius: 3px; border: 0px; margin-bottom: 10px; margin-top: 10px; min-width: 20%;&quot;&gt;&lt;colgroup&gt;&lt;col class=&quot;label&quot;&gt;&lt;/col&gt;&lt;col&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;tbody valign=&quot;top&quot;&gt;
&lt;tr&gt;&lt;td class=&quot;label&quot; style=&quot;border-radius: 3px; border: 0px; padding: 0.3em 0.5em;&quot;&gt;&lt;a class=&quot;fn-backref&quot; href=&quot;https://docs.python.org/3.3/tutorial/datastructures.html#id2&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;[2]&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;border-radius: 3px; border: 0px; padding: 0.3em 0.5em;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Apelarea&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;tastelor d ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;va returna un&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;obiect de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em class=&quot;dfn&quot;&gt;vizualizare a dicționarului&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acceptă operații precum testul de membru și iterația, dar conținutul său nu este independent de dicționarul original - este doar o&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;viziune&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/h1&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h1&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Modulele&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/modules.html#modules&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div style=&quot;color: #222222; font-size: 16px; line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă renunțați la interpretul Python și îl introduceți din nou, definițiile pe care le-ați făcut (funcții și variabile) sunt pierdute.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Prin urmare, dacă doriți să scrieți un program oarecum mai lung, vă recomandăm mai bine să utilizați un editor de text pentru a pregăti intrarea pentru interpret și pentru ao executa cu acel fișier ca intrare.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest lucru este cunoscut ca crearea unui&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;script&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pe măsură ce programul dvs. devine mai lung, vă recomandăm să îl împărțiți în mai multe fișiere pentru o întreținere mai ușoară.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Poate doriți să utilizați o funcție utilă pe care ați scris-o în mai multe programe, fără a copia definiția acesteia în fiecare program.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #222222; font-size: 16px; line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pentru a sprijini acest lucru, Python are o modalitate de a pune definițiile într-un fișier și de a le utiliza într-un script sau într-o instanță interactivă a interpretului.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Un astfel de fișier este numit&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;modul&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;definițiile dintr-un modul pot fi&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;importate&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;în alte module sau în&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;modulul&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;principal&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;(colecția de variabile la care aveți acces într-un script executat la nivel superior și în modul calculator).&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #222222; font-size: 16px; line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Un modul este un fișier care conține definiții și declarații Python.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Numele fișierului este numele modulului cu sufixul&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;file docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;.py&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;atașat.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În cadrul unui modul, numele modulului (ca șir) este disponibil ca valoare a variabilei globale&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;__name__&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu, utilizați editorul de text preferat pentru a crea un fișier numit&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;file docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;fibo.py&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;în directorul curent cu următorul conținut:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;color: #222222; font-size: 16px; position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Modul # numere Fibonacci&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;

&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;def &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;fib &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;( &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;n &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;): &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;    &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;# scrie seria Fibonacci pana la n &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;a &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;, &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;b &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;= &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;0 &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;, &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;1 în &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;timp ce &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;b &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;lt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;n &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;: &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
        &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;print &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;( &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;b &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;, &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;end &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;= &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&#39;&#39; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;) &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;a &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;, &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;b &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;= &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;b &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;, &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;a &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;+ &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;b &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;print &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;

&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;def &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;fib2 &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;( &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;n &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;): &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;# returnați seria Fibonacci până la n &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;rezultat &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;= &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;[] &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;a &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;, &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;b &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;= &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;0 &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;, &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;1 în &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;timp ce &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;b &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;lt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;n &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;: &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;rezultat &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;append &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;( &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;b &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;) &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;a &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;, &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;b &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;= &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;b &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;, &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;a &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;+ &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;b &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;revenire &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;rezultat&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;color: #222222; font-size: 16px; line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acum introduceți interpretul Python și importați acest modul cu următoarea comandă:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;color: #222222; font-size: 16px; position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;kn&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;import &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;nn&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;fibo&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;color: #222222; font-size: 16px; line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Aceasta nu introduce numele funcțiilor definite în&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;fibo&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;direct în tabela simbolică curentă;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;intră doar în numele modulului&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;fibo&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;acolo.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Folosind numele modulului puteți accesa funcțiile:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;color: #222222; font-size: 16px; position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;fibo &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;fib &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;( &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;1000 &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;) &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;fibo &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;fib2 &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;( &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;100 &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;) &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;[1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89] &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;fibo &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;__name__ &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&#39;fibo&#39;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;color: #222222; font-size: 16px; line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă intenționați să utilizați o funcție de multe ori, puteți să o atribuiți unui nume local:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;color: #222222; font-size: 16px; position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;fib &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;= &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;fibo &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;fib &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;fib &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;( &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;500 &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;) &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;1 1 2 3 5 8 13 21 34 55 89 144 233 377&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 25.6px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;6.1.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Mai multe despre module&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/modules.html#more-on-modules&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; id=&quot;more-on-modules&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;span id=&quot;tut-moremodules&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Un modul poate conține instrucțiuni executabile, precum și definiții ale funcțiilor.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Aceste instrucțiuni sunt destinate inițializării modulului.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Ele sunt executate numai pentru&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;prima&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;dată când numele modulului este întâlnit într-o declarație de import.&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;footnote-reference&quot; href=&quot;https://docs.python.org/3.3/tutorial/modules.html#id2&quot; id=&quot;id1&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;[1]&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;(De asemenea, se execută dacă fișierul este executat ca script).&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Fiecare modul are propria tabelă de simboluri private, care este utilizată ca tabelă simbol globală de toate funcțiile definite în modul.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Astfel, autorul unui modul poate folosi variabilele globale în modul fără să se preocupe de ciocniri accidentale cu variabilele globale ale utilizatorului.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pe de altă parte, dacă știți ce faceți, puteți atinge variabilele globale ale unui modul cu aceeași notație folosită pentru a vă referi la funcțiile sale,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;modname.itemname&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Modulele pot importa alte module.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Este obișnuit, dar nu este necesar să plasați toate&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;declarațiile de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/simple_stmts.html#import&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;import&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;la începutul unui modul (sau script, de pildă).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Numele modulelor importate sunt plasate în tabelul simbolului global al modulului de import.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Există o variantă a&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;instrucțiunii de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/simple_stmts.html#import&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;import&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;care importează numele dintr-un modul direct în tabelul cu simboluri al modulului de import.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; de &lt;/span&gt;&lt;span class=&quot;kn&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;la &lt;/span&gt; &lt;span class=&quot;nn&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;fibo &lt;/span&gt; &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;import &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;fib &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;fib2 &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;fib &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;500 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;1 1 2 3 5 8 13 21 34 55 89 144 233 377&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest lucru nu introduce numele modulului din care se fac importurile în tabelul simbolurilor locale (așa că în exemplul de față&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;fiboxul&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;nu este definit).&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Există chiar și o variantă pentru a importa toate denumirile pe care un modul le definește:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; de &lt;/span&gt;&lt;span class=&quot;kn&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;la &lt;/span&gt; &lt;span class=&quot;nn&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;fibo &lt;/span&gt; &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;import &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;* &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;fib &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;500 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;1 1 2 3 5 8 13 21 34 55 89 144 233 377&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Aceasta importă toate denumirile, cu excepția celor care încep cu o subliniere (&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;_&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În majoritatea cazurilor, programatorii Python nu utilizează această facilitate deoarece introduc un set necunoscut de nume în interpret, ascunzând eventual unele lucruri pe care le-ați definit deja.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Rețineți că, în general, practica importării&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;* de&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;la un modul sau un pachet este încruntată, deoarece provoacă adesea un cod ușor de citit.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Cu toate acestea, este bine să o utilizați pentru a salva scrierea în sesiuni interactive.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;admonition note&quot; style=&quot;background-color: #eeeeee; border-radius: 3px; border: 1px solid rgb(204, 204, 204); margin-bottom: 10px; margin-top: 10px; padding: 7px;&quot;&gt;
&lt;div class=&quot;first admonition-title&quot; style=&quot;display: inline; font-weight: bold; line-height: 22.4px; margin-bottom: 5px; margin-right: 10px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Notă&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;last&quot; style=&quot;display: inline; line-height: 22.4px; margin-bottom: 5px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Din motive de eficiență, fiecare modul este importat doar o singură sesiune de interpret.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Prin urmare, dacă modificați modulele, trebuie să reporniți interpretul - sau, dacă este doar un modul pe care doriți să-l testați interactiv, utilizați&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/imp.html#imp.reload&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;imp.reload&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background: rgb(214, 214, 214); border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;imp.reload ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, de ex.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background: rgb(214, 214, 214); border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Import&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;imp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;imp.reload (modulename)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/h1&gt;
&lt;h3 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 22.4px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;6.1.1.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Executarea modulelor ca scripturi&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/modules.html#executing-modules-as-scripts&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;div class=&quot;section&quot; id=&quot;executing-modules-as-scripts&quot;&gt;
&lt;span id=&quot;tut-modulesasscripts&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Când rulați un modul Python cu&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;n&quot;&gt;python &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;fibo &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;py &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&amp;lt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;argumentele &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;codul din modul va fi executat, ca și cum l-ați importat, dar cu&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;__name__&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;setat la&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&quot;__main__&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Aceasta înseamnă că prin adăugarea acestui cod la sfârșitul modulului dvs.:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;dacă &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;__name__ &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;== &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;__main__&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
    &lt;span class=&quot;kn&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;import &lt;/span&gt; &lt;span class=&quot;nn&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;sys &lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;fib &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;int &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sys &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;argv &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]))&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;puteți face fișierul utilizabil ca script, precum și un modul importabil, deoarece codul care analizează linia de comandă rulează numai dacă modulul este executat ca fișier &quot;principal&quot;:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot;&gt;
&lt;pre style=&quot;background-color: #eeffcc; border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;$ python fibo.py 50&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
1 1 2 3 5 8 13 21 34&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă modulul este importat, codul nu este rulat:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;kn&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;import &lt;/span&gt; &lt;span class=&quot;nn&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;fibo &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest lucru este adesea folosit fie pentru a oferi o interfață de utilizare convenabilă unui modul, fie pentru scopuri de testare (funcționarea modulului ca script execută o suită de testare).&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/h1&gt;
&lt;h3 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 22.4px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;6.1.2.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Calea de căutare a modulului&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/modules.html#the-module-search-path&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;div class=&quot;section&quot; id=&quot;the-module-search-path&quot;&gt;
&lt;span id=&quot;tut-searchpath&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div id=&quot;index-0&quot; style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Când un modul numit&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;xref py py-mod docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;spam&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este importat, interpretul caută mai întâi un modul încorporat cu acest nume.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă nu este găsit, acesta caută apoi un fișier numit&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;file docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;spam.py&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;într-o listă de directoare date de variabila&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/sys.html#sys.path&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;sys.path&quot;&gt;&lt;tt class=&quot;xref py py-data docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sys.path&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/sys.html#sys.path&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;sys.path&quot;&gt;&lt;tt class=&quot;xref py py-data docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sys.path&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este inițializată din aceste locații:&lt;/span&gt;&lt;/div&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;directorul care conține scriptul de intrare (sau directorul curent).&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;span class=&quot;target&quot; id=&quot;index-1&quot;&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/using/cmdline.html#envvar-PYTHONPATH&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-envvar docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;PYTHONPATH&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;(o listă de nume de directoare, cu aceeași sintaxă ca variabila shell&lt;/span&gt;&lt;span class=&quot;target&quot; id=&quot;index-2&quot;&gt;&lt;/span&gt;&lt;tt class=&quot;xref std std-envvar docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;PATH&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;).&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;implicit pentru instalare.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;După inițializare, programele Python pot modifica&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/sys.html#sys.path&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;sys.path&quot;&gt;&lt;tt class=&quot;xref py py-data docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sys.path&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Directorul care conține scriptul care se execută este plasat la începutul căii de căutare, înainte de calea standard a bibliotecii.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Aceasta înseamnă că script-urile din directorul respectiv vor fi încărcate în locul modulelor cu același nume în directorul bibliotecii.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Aceasta este o eroare, cu excepția cazului în care se intenționează înlocuirea.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Vezi secțiunea&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/modules.html#tut-standardmodules&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em&gt;Module standard&lt;/em&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;pentru mai multe informații.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/h1&gt;
&lt;h3 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 22.4px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;6.1.3.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;„Compilat“ fișiere Python&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/modules.html#compiled-python-files&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;div class=&quot;section&quot; id=&quot;compiled-python-files&quot;&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pentru a accelera modulele de încărcare, Python&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;cachează&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;versiunea compilată a fiecărui modul din&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;directorul&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;__pycache__&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;sub&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;file docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;modulul de&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;nume&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;file docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;tt class=&quot;file docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;em&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;versiunea&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;/tt&gt;&lt;tt class=&quot;file docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.pyc&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, unde versiunea codifică formatul fișierului compilat;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;conține, în general, numărul versiunii Python.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu, în versiunea CPython 3.3, versiunea compilate a spam.py va fi stocată ca&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;__pycache __ / spam.cpython-33.pyc&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Această convenție de numire permite modulelor compilate din diferite versiuni și diferite versiuni ale Python să coexiste.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Python verifică data modificării sursei împotriva versiunii compilate pentru a vedea dacă este depășită și trebuie să fie recompilată.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acesta este un proces complet automat.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De asemenea, modulele compilate sunt independente de platformă, astfel încât aceeași bibliotecă poate fi împărțită între sisteme cu arhitecturi diferite.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Python nu verifică memoria cache în două situații.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În primul rând, întotdeauna recompilează și nu stochează rezultatul pentru modulul încărcat direct din linia de comandă.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În al doilea rând, nu verifică memoria cache dacă nu există niciun modul sursă.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pentru a suporta o distribuție non-sursă (compilate numai), modulul compilat trebuie să fie în directorul sursă și nu trebuie să existe un modul sursă.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Câteva sfaturi pentru experți:&lt;/span&gt;&lt;/div&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Puteți utiliza&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;comutatoarele&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/using/cmdline.html#cmdoption-O&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em class=&quot;xref std std-option&quot;&gt;-O&lt;/em&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;sau&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/using/cmdline.html#cmdoption-OO&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em class=&quot;xref std std-option&quot;&gt;-OO&lt;/em&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;din comanda Python pentru a reduce dimensiunea unui modul compilat.&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;-O&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;Comutatorul elimină afirma declarații,&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;-OO&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;comutatorul îndepårteazå afirma declarații și șiruri __doc__.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Întrucât unele programe se pot baza pe faptul că acestea sunt disponibile, trebuie să utilizați această opțiune numai dacă știți ce faceți.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Modulele &quot;optimizate&quot; au un .pyo mai degrabă decât un sufix .pyc și sunt de obicei mai mici.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Eliberările viitoare pot schimba efectele optimizării.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Un program nu rulează mai repede când este citit dintr-un&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;fișier&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;.pyc&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;sau&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;.pyo&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;decât atunci când este citit dintr-un&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;fișier&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;.py&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;singurul lucru care este mai rapid despre&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;fișierele&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;.pyc&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;sau&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;.pyo&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este viteza cu care sunt încărcate.&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Modulul&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/compileall.html#module-compileall&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;compileall: Unelte pentru compilarea tuturor fișierelor sursă Python într-un arbore de directoare.&quot;&gt;&lt;tt class=&quot;xref py py-mod docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;compileall&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;poate crea fișiere .pyc (sau fișiere .pyo când&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;se utilizează&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/using/cmdline.html#cmdoption-O&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em class=&quot;xref std std-option&quot;&gt;-O&lt;/em&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;) pentru toate modulele dintr-un director.&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Există mai multe detalii despre acest proces, inclusiv o diagramă a deciziilor, în PEP 3147.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 25.6px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;6.2.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Module standard&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/modules.html#standard-modules&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; id=&quot;standard-modules&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;span id=&quot;tut-standardmodules&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div id=&quot;index-3&quot; style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Python vine cu o bibliotecă de module standard, descrisă într-un document separat, Python Library Reference (&quot;Biblioteca de referință&quot; de mai jos).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Unele module sunt construite în interpret;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;acestea oferă acces la operații care nu fac parte din miezul limbii, dar sunt totuși construite, fie pentru eficiență, fie pentru a oferi acces la primitivi ai sistemului de operare, cum ar fi apelurile de sistem.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Setul de astfel de module este o opțiune de configurare care depinde și de platforma de bază.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;modulul&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/winreg.html#module-winreg&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;winreg: Rutine și obiecte pentru a manipula registrul Windows.  (Windows)&quot;&gt;&lt;tt class=&quot;xref py py-mod docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;winreg&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este furnizat numai pe sistemele Windows.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Un modul special merită o atenție deosebită:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/sys.html#module-sys&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;sys: Accesați parametrii și funcțiile specifice sistemului.&quot;&gt;&lt;tt class=&quot;xref py py-mod docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sys&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, care este construit în fiecare interpret Python.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Variabilele&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sys.ps1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sys.ps2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;definiți șirurile utilizate ca mesaje primare și secundare:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;kn&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;import &lt;/span&gt; &lt;span class=&quot;nn&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;sys &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sys &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ps1 &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39;&amp;gt;&amp;gt;&amp;gt;&#39; &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sys &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ps2 &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39;...&#39; &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sys &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ps1 &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;C&#39; &#39; &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;C&amp;gt; print (&#39; Yuck! &#39;) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;Yuck! &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;C&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Aceste două variabile sunt definite numai dacă interpretul este în modul interactiv.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Variabila&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sys.path&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este o listă de șiruri care determină calea de căutare a modulelor de interpretare.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Aceasta este inițializată la o cale implicită luată din variabila de mediu&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;target&quot; id=&quot;index-4&quot;&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/using/cmdline.html#envvar-PYTHONPATH&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-envvar docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;PYTHONPATH&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;sau dintr-o valoare implicită încorporată dacă&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;target&quot; id=&quot;index-5&quot;&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/using/cmdline.html#envvar-PYTHONPATH&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-envvar docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;PYTHONPATH&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;nu este setat.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Puteți să o modificați utilizând operațiuni de listă standard:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;kn&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;import &lt;/span&gt; &lt;span class=&quot;nn&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;sys &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sys &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;calea &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;adăugați &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;/ ufs / guido / lib / python&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 25.6px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;6.3.&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#dir&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;dir&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 24.704px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dir ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;Funcția&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/modules.html#the-dir-function&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; id=&quot;the-dir-function&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;span id=&quot;tut-dir&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Funcția built-in&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#dir&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;dir&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;dir ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este utilizată pentru a afla ce nume definește un modul.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Returnează o listă ordonată de șiruri de caractere:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;kn&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;import &lt;/span&gt; &lt;span class=&quot;nn&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;fibo &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;nn&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;sys &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;dir &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;fibo &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;[ &#39;__name__&#39;, &#39;fib&#39;, &#39;fib2&#39;] &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;dir &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sys &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;  
&lt;span class=&quot;go&quot;&gt;[ &#39;__egginsert&#39; &#39;__displayhook__&#39;, &#39;__doc__&#39;, &#39;__excepthook__&#39; , &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39;__loader__&#39;, &#39;__name__&#39;, &#39;__package__&#39;, &#39;__plen&#39;, &#39;__stderr__&#39;, &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39;__stdin__&#39;, &#39;__stdout__&#39;, _clear_type_cache, &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;_current_frames, _debugmallocstats, _getframe, _mercurial &#39;,&#39; _xoptions &#39;, &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39; abiflags &#39;,&#39; api_version &#39;,&#39; argv &#39;,&#39; base_exec_prefix &#39;,&#39;base_prefix&#39;, &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39;builtin_module_names&#39;, &#39;byteorder&#39;, &#39;call_tracing&#39;, &#39;callstats&#39;, &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39;copyright&#39;, &#39;displayhook&#39;, &#39;dont_write_bytecode&#39;, &#39;exc_info&#39;&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&quot;excepție&quot;, &quot;exec_prefix&quot;, &quot;executabil&quot;, &quot;ieșire&quot;, &quot;flags&quot;, &quot;float_info&quot;, &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&quot;float_repr_style&quot;, &quot;getcheckinterval&quot;, &quot;getdefaultencoding&quot;, &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&quot;getdjeckinflags&quot;, &quot;getfilesystemencoding&quot; &#39;, &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39; getrequsionlimit &#39;,&#39; getrefcount &#39;,&#39; getizeof &#39;,&#39; getwitchinterval &#39;, &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39; gettotalrefcount &#39;,&#39; gettrace &#39;,&#39; hash_info &#39;,&#39; hexversion &#39;, &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39; implementation &#39;,&#39; int_info &#39;,&#39; intern &#39;,&#39; maxsize &#39; &#39;maxunicode&#39;, &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39;meta_path&#39;, &#39;modules&#39;, &#39;path&#39;, &#39;path_hooks&#39;, &#39;path_importer_cache&#39;, &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39;platform&#39;, &#39;prefix&#39;, &#39;ps1&#39;, &#39;setdlopenflags&#39;, &#39;setcheckinterval&#39; &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39;setprofile&#39;, &#39;setrecursionlimit&#39;, &#39;setswitchinterval&#39;, &#39;settrace&#39;, &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39;stderr&#39;, &#39;stdin&#39;, &#39;stdout&#39;, &#39;thread_info&#39;, &#39;versiune&#39;, &#39;version_info&#39;, &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;„warnoptions „]&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Fără argumente,&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#dir&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;dir&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;dir ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;listează numele pe care le-ați definit în prezent:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;3 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;4 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;5 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;kn&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;import &lt;/span&gt; &lt;span class=&quot;nn&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;fibo &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;fib &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;fibo &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;fib &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;dir &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;() &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;[&#39;__builtins__&#39;, &#39;__name__&#39;, &#39;a&#39;, &#39;fib&#39;, &#39;fibo&#39;, &#39;sys&#39;]&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Rețineți că acesta afișează toate tipurile de nume: variabile, module, funcții etc.&lt;/span&gt;&lt;/div&gt;
&lt;div id=&quot;index-6&quot; style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#dir&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;dir&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;dir ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;nu conține numele funcțiilor și variabilelor încorporate.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă doriți o listă a acestora, acestea sunt definite în modulul standard&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/builtins.html#module-builtins&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;builtins: modulul care furnizează spațiul de nume încorporat.&quot;&gt;&lt;tt class=&quot;xref py py-mod docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;builtins&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;kn&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;import &lt;/span&gt; &lt;span class=&quot;nn&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;Afi &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;dir &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Afi &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;  
&lt;span class=&quot;go&quot;&gt;[ &#39;ArithmeticError&#39;, &#39;AssertionError&#39;, &#39;AttributeError&#39;, &#39;BaseException&#39;, &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39;BlockingIOError&#39;, &#39;BrokenPipeError&#39;, &#39;BufferError&#39;, &#39;BytesWarning&#39;, &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39;ChildProcessError&#39;, &#39; ConnectionAbortedError“, &#39;ConnectionError&#39;, &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39;ConnectionRefusedError&#39;, &#39;ConnectionResetError&#39;, &#39;DeprecationWarning&#39;, &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39;EOFError&#39;, &#39;Ellipsis&#39;, &#39;EnvironmentError&#39;, &#39;Excepție&#39;, &#39;fals&#39;, &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39;fileexistserror&#39;, &#39;FileNotFoundError&#39;, &#39;FloatingPointError&#39; , &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&quot;FutureWarning&quot;, &quot;GeneratorExit&quot;, &quot;IOError &quot;,&quot; ImportError &quot;, &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&quot; ImportWarning &quot;,&quot; IndentationError &quot;,&quot; IndexError &quot;,&quot; InterruptedError &quot;,&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&quot;IsADirectoryError&quot;, &quot;KeyError&quot;, &quot;KeyboardInterrupt&quot;, &quot;LookupError&quot;, &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&quot;MemoryError&quot;, &quot;NameError&quot;, &quot;None&quot;, &quot;NotADirectoryError&quot;, &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&quot;NotImplemented&quot;, &quot;NotImplementedError&quot;, &quot;OverflowError&quot;, &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;PendingDeprecationWarning &#39;,&#39; &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;RunError &#39;, &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39; RuntimeWarning &#39;,&#39; StopIteration &#39;,&#39; SyntaxError &#39;,&#39; SyntaxWarning &#39;,&#39; SystemError &#39;, &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39; SystemExit &#39;,&#39; TabError &#39;, &lt;/span&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span class=&quot;go&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&#39; PermissionError &#39;,&#39; ProcessLookupError &#39;, &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;go&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&#39; ReferenceError &#39;,&#39; ResourceWarning &#39; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;go&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&quot;TimeoutError&quot;, &quot;Adevărat&quot;, &quot;TypeError&quot;, &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;go&quot;&gt;&quot;UnboundLocalError&quot;, &quot;UnicodeDecodeError&quot;, &quot;UnicodeEncodeError&quot;, &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&quot;UnicodeError&quot;, &quot;UnicodeTranslateError&quot;, &quot;UnicodeWarning&quot;, &quot;UserWarning&quot;, &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&quot;ValueError&quot;, &quot;Avertisment&quot;, &quot;ZeroDivisionError&quot;, &quot;_&quot;, &quot;__build_class__&quot;&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39;__debug__&#39;, &#39;__doc__&#39;, &#39;__import__&#39;, &#39;__name__&#39;, &#39;__package__&#39;, &#39;ABS&#39;, &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39;toate&#39;, &#39;orice&#39;, &#39;ascii&#39;, &#39;bin&#39;, &#39;bool&#39;, &#39;bytearray&#39;, „bytes &#39;,&#39; &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;chr &#39;,&#39; classmethod &#39;,&#39; compile &#39;,&#39; complex &#39;,&#39; copyright &#39;,&#39; credits &#39;, &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39; delattr &#39;,&#39; dict &#39;,&#39; dir &#39;,&#39; divmod &#39; &#39;eval&#39;, &#39;exec&#39;, &#39;exit&#39;, &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39;filter&#39;, &#39;float&#39;, &#39;format&#39;, &#39;frozenset&#39;, &#39;getattr&#39;, &#39;globals&#39;, &#39;hasattr&#39;, &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39;hash&#39;, &#39;help&#39; &#39;,&#39; id &#39;,&#39; intrare &#39;,&#39; int &#39;,&#39; isinstance &#39;,&#39; issubclass &#39;, &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39;iter &#39;,&#39; len &#39;,&#39; local &#39;,&#39; map &#39;,&#39; max &#39;,&#39; memoryview &#39;, &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39; min &#39;,&#39; next &#39;,&#39; , &quot;ord&quot;, &quot;pow&quot;, &quot;print&quot;, &quot;proprietate&quot;, &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&quot;quit&quot;, &quot;gamă&quot;, &quot;repr&quot;, &quot;inversat &lt;/span&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span class=&quot;go&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&quot; sort &quot;,&quot; staticmethod &quot;,&quot; str &quot;,&quot; sum &quot;,&quot; super &quot;,&quot; tuplu &quot;,&quot; tip &quot;,&quot; vars &quot;proprietățile &quot;, &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;go&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&quot; quit &quot;,&quot; intervalul &quot;,&quot; repr &quot;,&quot; inversat &quot;,&quot; rotund &quot;,&quot; set &quot;,&quot; setattr &quot;,&quot; slice &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;go&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&quot; , &quot;super&quot;, &quot;tuplu&quot;, &quot;tip&quot;, &quot;vars&quot;,proprietățile &quot;, &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;go&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&quot; quit &quot;,&quot; intervalul &quot;,&quot; repr &quot;,&quot; inversat &quot;,&quot; rotund &quot;,&quot; set &quot;,&quot; setattr &quot;,&quot; slice &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;go&quot;&gt;&quot; , &quot;super&quot;, &quot;tuplu&quot;, &quot;tip&quot;, &quot;vars&quot;,&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt; &#39;Zip&#39;]&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 25.6px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;6.4.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pachete&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/modules.html#packages&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; id=&quot;packages&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;span id=&quot;tut-packages&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pachetele reprezintă o modalitate de a structura spațiul de nume al modulelor Python utilizând &quot;nume de module punctate&quot;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu, numele modulului&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;xref py py-mod docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;AB&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;desemneaza un submodul&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;B&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;într -&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;un pachet numit&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;A&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;La fel ca utilizarea modulelor salvează autorii diferitelor module de faptul că trebuie să vă faceți griji în legătură cu numele variabilelor globale ale fiecăruia, folosirea numelor de module întrerupte salvează autorii pachetelor multi-modul cum ar fi NumPy sau Biblioteca de Imagistică Python de la a fi nevoiți să vă faceți griji pentru fiecare numele altor module.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Să presupunem că doriți să proiectați o colecție de module (un &quot;pachet&quot;) pentru o manipulare uniformă a fișierelor audio și a datelor de sunet.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Există multe formate diferite de fișiere de sunet (de obicei, recunoscute de extensia lor, de exemplu:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;file docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;.wav&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;,&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;file docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;.aiff&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;,&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;file docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;.au&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;), astfel încât este posibil să fie nevoie să creați și să mențineți o colecție de module pentru convertirea între diferitele formate de fișiere.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Există, de asemenea, multe operațiuni diferite pe care doriți să le efectuați pe date de sunet (cum ar fi amestecarea, adăugarea de ecouri, aplicarea unei funcții egalizatoare, crearea unui efect stereo artificial), astfel încât, în plus, veți scrie un flux neîntrerupt de module pentru a efectua aceste operațiuni.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Iată o structură posibilă pentru pachetul dvs. (exprimată în termeni de sistem de fișiere ierarhic):&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-text&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sunet / pachet de nivel superior&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
      __init__.py Inițializați pachetul de sunet&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
      formate / Subpachet pentru conversii în format de fișier&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
              __init__.py&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
              wavread.py&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
              wavwrite.py&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
              aiffread.py&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
              aiffwrite.py&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
              auread.py&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
              auwrite.py&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
              ...&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
      efecte / subpachet pentru efecte sonore&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
              __init__.py&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
              echo.py&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
              surround.py&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
              reverse.py&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
              ...&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
      filtre / subpachetare pentru filtre&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
              __init__.py&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
              equalizer.py&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
              vocoder.py&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
              karaoke.py&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
              ...&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;La importul pachetului, Python caută directoarele pe&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sys.path&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;căutând subdirectorul de pachete.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Cele&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;file docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;__init__.py&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;Fișierele sunt necesare pentru a face Python trateze directoarele ca pachete care&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;conțin;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;acest lucru se face pentru a împiedica directoarele cu un nume comun, cum ar fi&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;șirul&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, să ascundă neintenționat module valide care apar ulterior pe calea de căutare a modulelor.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În cel mai simplu caz,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;file docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;__init__.py&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;poate fi doar un fișier gol, dar poate executa și codul de inițializare pentru pachet sau poate seta&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;variabila&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;__all__&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;descrisă mai târziu.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Utilizatorii pachetului pot importa module individuale din pachet, de exemplu:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;kn&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;import &lt;/span&gt; &lt;span class=&quot;nn&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;sound.effects.echo&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest lucru încarcă submodul&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;xref py py-mod docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sound.effects.echo&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Trebuie să fie menționată cu numele său complet.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;n&quot;&gt;sunet &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;efecte &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;echo &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;echofilter &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;intrare &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ieșire &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;întârziere &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt;&lt;span class=&quot;mf&quot; style=&quot;color: #208050;&quot;&gt;0,7 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;atten &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;4 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;O modalitate alternativă de a importa submodul este:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;kn&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;de la &lt;/span&gt; &lt;span class=&quot;nn&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;sound.effects &lt;/span&gt; &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;import &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;echo&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De asemenea, se încarcă&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;xref py py-mod docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;ecoul&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;submodulului&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;și îl face disponibil fără prefixul pachetului, astfel încât acesta poate fi folosit după cum urmează:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;n&quot;&gt;echo &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;echofilter &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;intrare &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ieșire &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;întârziere &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt;&lt;span class=&quot;mf&quot; style=&quot;color: #208050;&quot;&gt;0,7 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;atten &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;4 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;O altă variantă este importul direct al funcției sau al variabilei dorite:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;kn&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;de la &lt;/span&gt; &lt;span class=&quot;nn&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;sound.effects.echo &lt;/span&gt; &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;import &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;echofilter&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Din nou, acest lucru încarcă&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;xref py py-mod docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;ecou&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;submodule&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;, dar acest lucru face ca funcția sa&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;echofilter () să fie&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;direct disponibilă:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;n&quot;&gt;echofilter &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;intrare &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ieșire &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;întârziere &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt;&lt;span class=&quot;mf&quot; style=&quot;color: #208050;&quot;&gt;0,7 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;atten &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;4 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Rețineți că atunci când utilizați&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;din&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;elementul de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;import al&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pachetelor&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;, elementul poate fi fie un submodul (sau subpachetul) al pachetului, fie un alt nume definit în pachet, ca o funcție, o clasă sau o variabilă.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Instrucțiunea de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;import&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;verifică mai întâi dacă articolul este definit în pachet;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;dacă nu, presupune că este un modul și încearcă să îl încarce.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă nu reușește să o găsească, o&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;excepție&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/exceptions.html#ImportError&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;ImportError&quot;&gt;&lt;tt class=&quot;xref py py-exc docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;ImportError&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este ridicată.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Contrar, atunci când se utilizează o sintaxă precum&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;importul&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;item.subitem.subsubitem&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, fiecare articol, cu excepția ultimului, trebuie să fie un pachet;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;ultimul element poate fi un modul sau un pachet, dar nu poate fi o clasă sau o funcție sau o variabilă definită în articolul anterior.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/h1&gt;
&lt;h3 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 22.4px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;6.4.1.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Importul * dintr-un pachet&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/modules.html#importing-from-a-package&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;div class=&quot;section&quot; id=&quot;importing-from-a-package&quot;&gt;
&lt;span id=&quot;tut-pkg-import-star&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div id=&quot;index-7&quot; style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acum ce se întâmplă atunci când utilizatorul scrie&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;din&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;importul&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sound.effects&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;*&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;?&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În mod ideal, s-ar speranța că aceasta va ieși într-o oarecare măsură în sistemul de fișiere, va afla care submodule sunt prezente în pachet și le importă pe toate.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest lucru ar putea dura mult timp, iar sub-modulele de import ar putea avea efecte secundare nedorite care ar trebui să se producă numai atunci când submodulul este importat explicit.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Singura soluție este ca autorul pachetului să furnizeze un indice explicit al pachetului.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Instrucțiunea de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/simple_stmts.html#import&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;import&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;utilizează următoarea convenție: dacă&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;codul&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;file docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;__init__.py&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;al unui pachet&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;definește o listă numită&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;__all__&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, este considerată lista cu numele de module care ar trebui să fie importate când&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;se întâlnește&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;din&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;importul de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pachete&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;*&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Depinde de autorul pachetului să păstreze actualizarea acestei liste atunci când este lansată o nouă versiune a pachetului.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Autorii pachetelor pot, de asemenea, să decidă să nu o susțină, dacă nu văd o utilizare pentru importul * din pachetul lor.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu, fișierul&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;file docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sunet / efecte / __ init__.py&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;ar putea conține următorul cod:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;n&quot;&gt;__all__ &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;ecou&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;surround&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;invers&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest lucru ar însemna că&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;importul&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;* de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;la&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sound.effects&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;ar importa cele trei submodule numite ale&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pachetului de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;xref py py-mod docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sunet&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;__all__&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;nu este definit, declarația de&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;la&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Sound.Effects&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;import&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;*&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;nu&amp;nbsp;&lt;/span&gt;&lt;em&gt;nu&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;importa toate submodule din pachetul&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;xref py py-mod docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Sound.Effects&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;în spațiul de&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;nume curent;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;se asigură numai că&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;au fost importate&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;xref py py-mod docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;efecte sonore&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;ale pachetului&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;(eventual executând orice cod de inițializare în&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;file docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;__init__.py&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;) și apoi importă orice nume sunt definite în pachet.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Aceasta include orice nume definite (și submodule încărcate explicit) de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;file docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;__init__.py&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acesta include, de asemenea, toate submodulele pachetului care au fost încărcate în mod explicit de&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;declarațiile&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;anterioare de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/simple_stmts.html#import&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;import&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Luați în considerare acest cod:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;kn&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;import &lt;/span&gt; &lt;span class=&quot;nn&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;sound.effects.echo &lt;/span&gt;
&lt;span class=&quot;kn&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;import &lt;/span&gt; &lt;span class=&quot;nn&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;sound.effects.surround de &lt;/span&gt;
&lt;span class=&quot;kn&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;la &lt;/span&gt; &lt;span class=&quot;nn&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;sound.effects &lt;/span&gt; &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;import &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;*&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În acest exemplu,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;modulele de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;xref py py-mod docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;ecou&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;xref py py-mod docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;surround&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;sunt importate în spațiul de nume curent deoarece sunt definite în&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pachetul&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;xref py py-mod docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sound.effects&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;atunci când&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;declarația de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;import din ...&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este executată.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;(Aceasta funcționează și atunci când&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;__all__&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este definit.)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Deși anumite module sunt proiectate să exporte numai nume care urmează anumite modele atunci când utilizați&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;import&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;*&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, este încă considerată o practică nepotrivită în codul de producție.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Rețineți că nu este nimic în neregulă cu utilizarea&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;din&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pachetul de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;import&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;specific_submodule&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;!&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De fapt, aceasta este notația recomandată dacă modulul de import nu trebuie să utilizeze submodule cu același nume din diferite pachete.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/h1&gt;
&lt;h3 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 22.4px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;6.4.2.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Referințe-pachet intra&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/modules.html#intra-package-references&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;div class=&quot;section&quot; id=&quot;intra-package-references&quot;&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Când pachetele sunt structurate în subpachete (ca în cazul&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pachetului de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;xref py py-mod docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sunet&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;din exemplu), puteți utiliza importurile absolute pentru a vă referi la submodulele pachetelor de frați.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu, dacă modulul&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;xref py py-mod docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sound.filters.vocoder&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;trebuie să utilizeze&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;modulul&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;xref py py-mod docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;ecou&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;din&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pachetul&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;xref py py-mod docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sound.effects&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, acesta poate folosi&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;din&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sound.effects&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;import&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;echo&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Puteți scrie , de&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;asemenea ,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;importurile relative, cu de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;la&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;modulul de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;import&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;numele&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;sub formă de declarație de&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;import.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Aceste importuri utilizează puncte de vârf pentru a indica pachetele actuale și părțile implicate în importul relativ.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;exemplu, de la modulul&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;xref py py-mod docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;surround&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, este posibil să utilizați:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;kn&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;de la &lt;/span&gt; &lt;span class=&quot;nn&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;. &lt;/span&gt; &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;importă &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ecou &lt;/span&gt;
&lt;span class=&quot;kn&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;din &lt;/span&gt; &lt;span class=&quot;nn&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;.. &lt;/span&gt; &lt;span style=&quot;vertical-align: inherit;&quot;&gt;formate de &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;import &lt;/span&gt; &lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span class=&quot;kn&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;din &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;nn&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;..filters &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;import &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;egalizator&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;kn&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;nn&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Rețineți că importurile relative se bazează pe numele modulului curent.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Deoarece numele modulului principal este întotdeauna&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&quot;__main__&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, modulele destinate a fi utilizate ca modul principal al unei aplicații Python trebuie să utilizeze întotdeauna importuri absolute.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/h1&gt;
&lt;h3 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 22.4px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;6.4.3.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pachete în mai multe directoare&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/modules.html#packages-in-multiple-directories&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;div class=&quot;section&quot; id=&quot;packages-in-multiple-directories&quot;&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pachetele suportă încă un atribut special,&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;xref py py-attr docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;__path__&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Aceasta este inițializată pentru a fi o listă care conține numele directorului care ține&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;fișierul&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;file docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;__init__.py&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;al pachetului&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;înainte ca codul din acel fișier să fie executat.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Această variabilă poate fi modificată;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;acest lucru afectează căutările viitoare pentru module și subpachete conținute în pachet.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În timp ce această caracteristică nu este adesea necesară, ea poate fi utilizată pentru a extinde setul de module găsite într-un pachet.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;rubric&quot; style=&quot;font-weight: bold; line-height: 22.4px; margin-top: 30px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Note de subsol&lt;/span&gt;&lt;/div&gt;
&lt;table class=&quot;docutils footnote&quot; frame=&quot;void&quot; id=&quot;id2&quot; rules=&quot;none&quot; style=&quot;border-collapse: collapse; border-radius: 3px; border: 0px; margin-bottom: 10px; margin-top: 10px; min-width: 20%;&quot;&gt;&lt;colgroup&gt;&lt;col class=&quot;label&quot;&gt;&lt;/col&gt;&lt;col&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;tbody valign=&quot;top&quot;&gt;
&lt;tr&gt;&lt;td class=&quot;label&quot; style=&quot;border-radius: 3px; border: 0px; padding: 0.3em 0.5em;&quot;&gt;&lt;a class=&quot;fn-backref&quot; href=&quot;https://docs.python.org/3.3/tutorial/modules.html#id1&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;[1]&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;border-radius: 3px; border: 0px; padding: 0.3em 0.5em;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De fapt, definițiile funcțiilor sunt și &quot;declarații&quot; care sunt &quot;executate&quot;;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;execuția unei definiții a funcției la nivel de modul introduce numele funcției în tabela simbolică globală a modulului.&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/h1&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;7. Intrări și ieșiri&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/inputoutput.html#input-and-output&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div style=&quot;color: #222222; font-size: 16px; line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Există mai multe modalități de prezentare a rezultatelor unui program;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;datele pot fi tipărite într-o formă ușor de citit de om sau scrise într-un fișier pentru utilizare ulterioară.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest capitol va discuta câteva posibilități.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/span&gt;&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 25.6px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;7.1.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Formatul de ieșire pentru fancier&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/inputoutput.html#fancier-output-formatting&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; id=&quot;fancier-output-formatting&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;span id=&quot;tut-formatting&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Până acum am întâlnit două modalități de scriere a valorilor:&amp;nbsp;&lt;/span&gt;&lt;em&gt;declarații de expresie&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și funcția&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#print&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;imprimare&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;print ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;(A treia cale este folosirea&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;metodei&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;write ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;a obiectelor de fișier, fișierul de ieșire standard poate fi referit ca&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sys.stdout&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Deseori veți dori mai mult control asupra formatării ieșirii decât prin simpla imprimare a valorilor separate de spațiu.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Există două moduri de formatare a ieșirii;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;prima modalitate este de a face toate manipularea string-ului;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;folosind operațiuni de tăiere în șir și operații de concatenare, puteți crea orice aspect pe care să-l puteți imagina.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Tipul de șir are câteva metode care efectuează operații utile pentru ștanțarea șirurilor la o anumită lățime a coloanei;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;acestea vor fi discutate în scurt timp.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;A doua modalitate este de a folosi metoda&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/stdtypes.html#str.format&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;str.format&quot;&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;str.format ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/string.html#module-string&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;șir: operațiuni de șir obișnuite.&quot;&gt;&lt;tt class=&quot;xref py py-mod docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Șir&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;Modulul conține un&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/string.html#string.Template&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;string.Template&quot;&gt;&lt;tt class=&quot;xref py py-class docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;șablon&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;de clasă care oferă încă un alt mod de&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;a înlocui valorile în șiruri.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;O întrebare rămâne, bineînțeles: cum convertiți valori în șiruri de caractere?&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Din fericire, Python are modalități de a converti orice valoare într-un șir: treceți-l la funcțiile&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#repr&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;Repr&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;repr ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;sau&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/stdtypes.html#str&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;str&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;str ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Funcția&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/stdtypes.html#str&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;str&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;str ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;are rolul de a returna reprezentări ale valorilor care pot fi citite de oameni, în timp ce&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#repr&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;Repr&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;repr ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este destinat să genereze reprezentări care pot fi citite de interpret (sau vor forța un&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/exceptions.html#SyntaxError&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;Eroare de sintaxă&quot;&gt;&lt;tt class=&quot;xref py py-exc docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;SyntaxError&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;dacă nu există o sintaxă echivalentă).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pentru obiectele care nu au o reprezentare specială pentru consumul uman,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/stdtypes.html#str&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;str&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;str ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;va reveni la aceeași valoare ca și&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#repr&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;Repr&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;repr ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Multe valori, cum ar fi numere sau structuri precum liste și dicționare, au aceeași reprezentare utilizând oricare dintre funcții.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Șirurile, în special, au două reprezentări distincte.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Cateva exemple:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;s &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;Bună ziua, lume.&#39; &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;str &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;s &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&quot;Bună ziua, lumea&quot;. &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;repr &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;s &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&quot; &#39;Bună ziua, lume.&#39;&quot; &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;str &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;/ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;7 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39;&#39; 0.14285714285714285 &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;10 &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;* &lt;/span&gt; &lt;span class=&quot;mf&quot; style=&quot;color: #208050;&quot;&gt;3.25 &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;y &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;200 &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;* &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;200 &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;s &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;„The valoarea lui x este &#39; &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;+ &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;repr &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;+ &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;, iar y este &#39;&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;+ &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;...&#39; &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;s &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;Valoarea lui x este 32.5, iar y este 40000 ... &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# Repr () dintr-un șir adaugă citate șir și spate: &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;hello &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;Bună ziua, lume &lt;/span&gt;&lt;span class=&quot;se&quot; style=&quot;color: #4070a0; font-weight: bold;&quot;&gt;\ n &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39; &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;hellos &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;repr &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;alo &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;hellos &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39;Bună ziua, lume \ n&#39; &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# argumentul repr () poate fi orice obiect Python: &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;Repr &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;spam&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;„ouă“&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&quot;(32.5, 40000, (&quot; spam &quot;,&quot; ouă &quot;))&quot;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Iată două modalități de a scrie o tabelă cu pătrate și cuburi:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;in &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;gama &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;11 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;repr &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Rjust &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;), &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;repr &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;* &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Rjust &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;3 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;), &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;end &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# Notă utilizarea &#39;final&#39; pe linia anterioară &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;imprimare &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;repr &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;* &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;* &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;rjust &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;1 1 1 &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;2 4 8 &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;3 9 27 &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;4 16 64 &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;5 25 125 &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;6 36 216 &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;7 49 343 &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;8 64 512 &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;9 81 729 &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;10 100 000&lt;/span&gt;

&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;in &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;gama &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;11 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;{0: 2d} {1: 3d} {2: 4d}&#39; &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Format &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;* &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;* &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;* &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) ) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;1 1 1 &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;2 4 8 &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;3 9 27 &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;4 16 64 &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;5 25 125 &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;6 36 216 &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;7 49 343 &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;8 64 512 &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;9 81 729 &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;10 100 1000&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;(Rețineți că în primul exemplu, un spațiu între fiecare coloană a fost adăugat prin modul&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#print&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;imprimare&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;print ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;: acesta adaugă întotdeauna spații între argumentele sale.)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest exemplu demonstrează metoda&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/stdtypes.html#str.rjust&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;str.rjust&quot;&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;str.rjust ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;a obiectelor șir, care justifică corect un șir dintr-un câmp de o anumită lățime, umplând-l cu spații în stânga.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Există metode similare&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/stdtypes.html#str.ljust&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;str.ljust&quot;&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;str.ljust ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/stdtypes.html#str.center&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;str.center&quot;&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;str.center ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Aceste metode nu scriu nimic, ci doar returnează un nou șir.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă șirul de introducere este prea lung, nu îl trunchiază, ci îl returnează neschimbat;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;acest lucru va afecta structura coloanei, dar de obicei este mai bună decât alternativa, care ar fi mincinoasă despre o valoare.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;(Dacă vreți cu adevărat trunchierea, puteți adăuga întotdeauna o operație cu felie, ca în&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;x.ljust (n) [: n]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;.)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Există o altă metodă,&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/stdtypes.html#str.zfill&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;str.zfill&quot;&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;str.zfill ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, care&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/stdtypes.html#str.zfill&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;str.zfill&quot;&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pătrunde într-&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;un șir numeric în stânga cu zerouri.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Înțelege semnele plus și minus:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;12&#39; &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;zfill &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;5 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39;00012&#39; &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;-3,14&#39; &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;zfill &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;7 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39;-003.14&#39; &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;3.14159265359&#39; &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;zfill &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;5 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&quot;3.14159265359&quot;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Utilizarea de bază a&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/stdtypes.html#str.format&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;str.format&quot;&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;metodei str.format ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;arată astfel:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;Print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;Suntem {} care spun &quot;{}!&quot;&#39; &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Format &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;cavaleri&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;Ni&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;Noi suntem cavaleri care spun &quot;Ni!&quot;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Parantezele și caracterele din ele (numite câmpuri de format) sunt înlocuite cu obiectele transmise în metoda&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/stdtypes.html#str.format&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;str.format&quot;&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;str.format ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Un număr din paranteze poate fi folosit pentru a se referi la poziția obiectului trecut în metoda&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/stdtypes.html#str.format&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;str.format&quot;&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;str.format ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;{0} și {1}&#39; &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Format &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;spam &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;ouă&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;spam și ouă &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;{1} și {0}&#39; &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Format &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot; spam &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;ouă&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;ouă și spam&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În cazul în care argumentele de cuvinte cheie sunt utilizate în metoda&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/stdtypes.html#str.format&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;str.format&quot;&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;str.format ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, valorile lor sunt menționate folosind numele argumentului.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;This {food} este {adjectiv}.&#39; &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;format &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;      &lt;span class=&quot;n&quot;&gt;food &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;spam&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;adjectiv &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;absolut oribil&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;Acest spam este absolut oribil.&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Argumentele poziționate și ale cuvintelor cheie pot fi combinate arbitrar:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;Povestea {0}, {1} și {alt}.&#39; &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Format &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;Bill&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;Manfred&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;                                                       alt = &#39;Georg&#39;)) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;Povestea lui Bill, Manfred și Georg .&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&#39;a&#39;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;(se aplică&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#ascii&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;ascii&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;ascii ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;),&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;&#39;! s&#39;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;(se aplică&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/stdtypes.html#str&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;str&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;str ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;) și&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;&#39;! r&#39;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;(se aplică&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#repr&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;Repr&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;repr ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;) poate fi folosit pentru a converti valoarea înainte de a fi formatat:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;kn&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;import &lt;/span&gt; &lt;span class=&quot;nn&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;math &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&#39;Valoarea lui PI este de &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;aproximativ {}.&#39; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Format &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;matematică &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Pi &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Valoarea PI este de &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;aproximativ 3.14159265359. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;Print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&#39;Valoarea lui PI este de &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;aproximativ {!} R.&#39; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Format &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;matematică &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Pi &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Valoarea PI este de &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;aproximativ 3.141592653589793.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Un opțional&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&quot;:&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și un specificator de format poate urma numele câmpului.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest lucru permite un control mai mare asupra modului în care este formatată valoarea.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Exemplul de mai jos trasează Pi la trei locuri după zecimală.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;kn&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;import &lt;/span&gt; &lt;span class=&quot;nn&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;math &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&#39;Valoarea lui PI este de &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;aproximativ {0: .3f}.&#39; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Format &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;matematică &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Pi &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Valoarea PI este de &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;aproximativ 3.142.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Trimiterea unui număr întreg după&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&#39;:&#39;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;va determina ca acest câmp să aibă un număr minim de caractere lățime.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest lucru este util pentru a face mese destul.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;table &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{ &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;Sjoerd&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;4127 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;Jack&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;4098 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;Dcab&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;7678 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;} &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;nume &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;telefon &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;tabel &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;articole &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(): &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;imprimare &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;{0:10} ==&amp;gt; {1: 10d}&#39; &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;format &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;nume &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;telefon &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;Jack ==&amp;gt; 4098 &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;Dcab ==&amp;gt; 7678 &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;Sjoerd ==&amp;gt; 4127&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă aveți un șir de format foarte lung pe care nu doriți să-l împărțiți, ar fi bine dacă ați putea face referire la variabilele care urmează să fie formatate în funcție de nume în loc de poziție.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest lucru se poate face prin simpla trecere a dictului și folosirea parantezelor&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;[]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;pentru a accesa cheile&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;tabel &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{ &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;Sjoerd&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;4127 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;Jack&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;4098 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;Dcab&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;8637678 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;} &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;„Jack: {0 [Jack]: d}; Sjoerd: {0 [Sjoerd]: d }; &#39; &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;      &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;Dcab: {0 [Dcab]: d}&#39; &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;format &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;tabel &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Jack: 4098; &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Sjoerd: 4127; &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dcab: 8637678&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest lucru se poate face și prin trecerea tabelului ca argumente pentru cuvinte cheie cu notația &#39;**&#39;.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Tabelul &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{ &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;Sjoerd&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;4127 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;Jack&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;4098 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;Dcab&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;8637678 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;} &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;Jack: {Jack: d} : d}“ &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;format &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;** &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;tabelul &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Jack: 4098; &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Sjoerd: 4127; &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dcab: 8637678&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest lucru este util în special în combinație cu funcția încorporată&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#vars&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;Vars&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;vars ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, care returnează un dicționar care conține toate variabilele locale.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pentru o prezentare completă a formatării șirului cu&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/stdtypes.html#str.format&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;str.format&quot;&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;str.format ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, consultați&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/string.html#formatstrings&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em&gt;Sintaxa de formatare a șirului&lt;/em&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/h1&gt;
&lt;h3 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 22.4px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;7.1.1.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Formatarea șirului vechi&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/inputoutput.html#old-string-formatting&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;div class=&quot;section&quot; id=&quot;old-string-formatting&quot;&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;%&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;Operatorul poate fi de&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;asemenea utilizat pentru formatarea șir de&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;caractere.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Aceasta interpretează argumentul stâng la fel ca un&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;șir de format&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;xref c c-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sprintf ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;-style pentru a fi aplicat argumentului drept și returnează șirul rezultat din această operație de formatare.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;kn&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;import &lt;/span&gt; &lt;span class=&quot;nn&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;math &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&#39;Valoarea lui PI este de &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;aproximativ% 5.3f.&#39; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;% &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Math &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Pi &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Valoarea lui PI este de &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;aproximativ 3.142.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Mai multe informații pot fi găsite în&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;secțiunea&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/stdtypes.html#old-string-formatting&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em&gt;Formatting String în stil printf&lt;/em&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 25.6px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;7.2.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Citirea și scrierea fișierelor&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/inputoutput.html#reading-and-writing-files&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; id=&quot;reading-and-writing-files&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;span id=&quot;tut-files&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div id=&quot;index-0&quot; style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#open&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;deschis&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;open ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;returnează un&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/glossary.html#term-file-object&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em class=&quot;xref std std-term&quot;&gt;&amp;nbsp;obiect de fișier&lt;/em&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și este cel mai frecvent utilizat cu două argumente:&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;open (nume fișier,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;mod)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;f &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;deschis &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;workfile&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;w&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Primul argument este un șir care conține numele fișierului.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Al doilea argument este un alt șir care conține câteva caractere care descriu modul în care fișierul va fi utilizat.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;Modul&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;poate fi&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&quot;r&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;atunci când fișierul va fi citit numai,&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&quot;w&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;pentru scris doar (un fișier existent cu același nume va fi șters), iar&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&quot;a&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;deschide fișierul pentru adăugare;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;toate datele scrise în fișier sunt adăugate automat la final.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&#39;r +&#39;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;deschide fișierul pentru citire și scriere.&amp;nbsp;&lt;/span&gt;&lt;em&gt;Modul&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;Argumentul este opțională;&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&quot;r&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;va fi asumat dacă este omis.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În mod normal, fișierele sunt deschise în&amp;nbsp;&lt;/span&gt;&lt;em class=&quot;dfn&quot;&gt;modul text&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, adică citiți și scrieți șiruri din și în fișier, care sunt codificate într-o anumită codificare (implicit UTF-8).&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&quot;b&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;atașat la modul deschide fișierul în&amp;nbsp;&lt;/span&gt;&lt;em class=&quot;dfn&quot;&gt;modul binar&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;: acum datele sunt citite și scrise sub formă de obiecte bytes.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest mod ar trebui să fie utilizat pentru toate fișierele care nu conțin text.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În modul text, setarea implicită la citire este de a converti terminațiile liniei specifice platformei (&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;\ n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;pe Unix,&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;\ r \ n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;pe Windows) la doar&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;\ n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Când scrieți în modul text, implicit este să convertiți aparițiile&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;\ n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;înapoi la terminalele liniei specifice platformei.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Această modificare a datelor din fișiere în spatele scenei este bună pentru fișierele text, dar va corupe datele binare, cum ar fi cele din&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;file docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;fișierele JPEG&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sau&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;file docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;EXE&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Fiți foarte atent să utilizați modul binar atunci când citiți și scrieți astfel de fișiere.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/h1&gt;
&lt;h3 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 22.4px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;7.2.1.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Metode ale obiectelor de fișiere&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/inputoutput.html#methods-of-file-objects&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;div class=&quot;section&quot; id=&quot;methods-of-file-objects&quot;&gt;
&lt;span id=&quot;tut-filemethods&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Restul exemplelor din această secțiune presupun că un obiect de fișier numit&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;f&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;a fost deja creat.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pentru a citi conținutul unui fișier, apelați&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;f.read (size)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, care citește o cantitate de date și o returnează ca un obiect șir sau bytes.&amp;nbsp;&lt;/span&gt;&lt;em&gt;dimensiunea&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este un argument numeric opțional.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Atunci când&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;mărimea&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este omisă sau negativă, întregul conținut al fișierului va fi citit și returnat;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;problema dvs. este dacă fișierul este de două ori mai mare decât memoria mașinii dvs.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În caz contrar, la cele mai multe&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;dimensiuni,&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;octeții sunt citiți și returnați.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă sa ajuns la sfârșitul fișierului,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;f.read ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;va returna un șir gol (&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&#39;&#39;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;).&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;f &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;read &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;() &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39;Acesta este întregul fișier. \ n&#39; &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;f &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;citiți &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;() &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39;&#39;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;f.readline ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;citește o singură linie din fișier;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;un caracter de linie nouă (&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;\ n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;) este lăsat la sfârșitul șirului și este omis pe ultima linie a fișierului dacă fișierul nu se termină într-o linie nouă.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Aceasta face ca valoarea de retur să fie neechivocă;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;dacă&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;f.readline ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;returnează un șir gol, sa ajuns la sfârșitul fișierului, în timp ce o linie necompletată este reprezentată de&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;&#39;\ n&#39;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, un șir care conține doar o singură linie nouă.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;f &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;readline &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;() &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39;Aceasta este prima linie a fișierului. \ n&#39; &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;f &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;readline &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;() &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39;A doua linie a fișierului \ n&#39; &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;f &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;readline &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;() &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#39;&#39;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pentru citirea liniilor dintr-un fișier, puteți să le cuplați peste obiectul de fișier.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Aceasta este memorie eficientă, rapidă și duce la un cod simplu:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;linia &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;in &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;f &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;line &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;end &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;Aceasta este prima linie a fisierului. &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;A doua linie a dosarului&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă doriți să citiți toate liniile unui fișier dintr-o listă, puteți utiliza și&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;lista (f)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;sau&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;f.readlines ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;f.write (string)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;scrie conținutul&lt;/span&gt;&lt;em&gt;&amp;nbsp;șirului&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;în fișier, returnând numărul de caractere scrise.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;f &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;scrie &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;Acesta este un test &lt;/span&gt;&lt;span class=&quot;se&quot; style=&quot;color: #4070a0; font-weight: bold;&quot;&gt;\ n &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;15&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pentru a scrie ceva diferit de un șir, trebuie mai întâi să fie convertit într-un șir:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;value &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;răspunsul&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;42 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;s &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;str &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;valoare &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;f &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;scrie &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;e &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;18&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;f.tell ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;returnează un număr întreg care dă poziția curentă a obiectului fișierului în fișierul reprezentat ca număr de octeți de la începutul fișierului când este în&lt;/span&gt;&lt;cite&gt;&amp;nbsp;modul binar&lt;/cite&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și un număr opac în&lt;/span&gt;&lt;cite&gt;modul text&lt;/cite&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pentru a modifica poziția obiectului fișierului, utilizați&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;f.seek (offset,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;from_what)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Poziția este calculată prin adăugarea de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;compensare&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;la un punct de referință;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;punctul de referință este selectat de&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;argumentul&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;from_what&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;O&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;from_what&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;valoare de 0 măsuri de la începutul fișierului, 1 utilizează poziția fișierului curent și 2 utilizează sfârșitul fișierului ca punct de&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;referință.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;from_what&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;poate fi omis și defaults la 0, folosind începutul fișierului ca punct de referință.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;f &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;deschide &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;workfile&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;rb +&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;f &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;scrie &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;b &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;0123456789abcdef&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;16 &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;f &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;căutați &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;5 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;     &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# Mergeți la cel de-al 6-lea octet din fișier &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;5 &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;f &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;citiți &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;b&#39;5 &#39; &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;f &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;căutați &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;- &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;3 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt; &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# Mergeți la cel de-al treilea byte înainte de finalul &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;13 &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;f &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;b&#39;d &#39;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În fișierele text (cele deschise fără un&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;b&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;în șirul de moduri) sunt permise doar căutările relative la începutul fișierului (excepția este&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;căutată&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;până la sfârșitul fișierului cu&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;căutarea (0,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;2)&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;) și singurele&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;valori&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;ofset&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;valide&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sunt cele returnate de la&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;f.tell ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, sau zero.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Orice altă&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;valoare&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;compensată&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;produce comportament nedefinit.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Când ați terminat cu un fișier, apelați&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;f.close ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;pentru al închide și a elibera toate resursele de sistem preluate de fișierul deschis.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;După ce a sunat&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;f.close ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, încercările de a utiliza obiectul de fișier vor eșua automat.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;f &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;închide &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;() &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;f &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;citiți &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;() &lt;/span&gt;
&lt;span class=&quot;gt&quot; style=&quot;color: #0044dd;&quot;&gt;Traceback (cel mai recent apel ultimul): &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
  Fișierul &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;&quot;&amp;lt;stdin&amp;gt;&quot; &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;, rândul &lt;/span&gt;&lt;span class=&quot;m&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;, în &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;? &lt;/span&gt;
&lt;span class=&quot;gr&quot; style=&quot;color: red;&quot;&gt;ValueError &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span class=&quot;gr&quot; style=&quot;color: red;&quot;&gt;operare &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;I / O pe fișier închis&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Este o&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;bună practică să folosească&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#with&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;cu&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;cuvinte cheie atunci când se&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;ocupă cu obiecte de&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;fișiere.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest lucru are avantajul că fișierul este închis corespunzător după terminarea suitei sale, chiar dacă se ridică o excepție pe parcurs.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Este, de asemenea, mult mai scurtă decât scrierea&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#try&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;încercării&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;echivalente&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;- în&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#finally&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;cele din urmă&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;blocuri:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;cu &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;open &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;workfile&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;r&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt; &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;ca &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;f &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;n&quot;&gt;read_data &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;f &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;citiți &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;() &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;f &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;închis &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;Adevărat&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Obiectele de fișiere au câteva metode suplimentare, cum ar fi&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;isatty ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;truncate (),&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;care sunt mai puțin utilizate;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;consultați Biblioteca Referință pentru un ghid complet al obiectelor de fișier.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/h1&gt;
&lt;h3 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 22.4px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;7.2.2.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Salvarea datelor structurate cu&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/json.html#module-json&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;json: codificați și decodați formatul JSON.&quot;&gt;&lt;tt class=&quot;xref py py-mod docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 21.616px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;json&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/inputoutput.html#saving-structured-data-with-json&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;div class=&quot;section&quot; id=&quot;saving-structured-data-with-json&quot;&gt;
&lt;span id=&quot;tut-json&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div id=&quot;index-1&quot; style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Șirurile pot fi ușor scrise și citite dintr-un fișier.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Numerele fac un efort mai mic, deoarece metoda&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;read ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;returneaza numai siruri de caractere, care trebuie sa fie transmise unei functii precum&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#int&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;int&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;int ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, care ia un sir ca&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&#39;123&#39;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;si isi returneaza valoarea numerica 123. Cand vrei sa salvați mai complexe tipuri de date, cum ar fi liste imbricate și dicționare, parsarea și serializarea manuală devine complicată.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Mai degrabă decât dacă utilizatorii au în mod constant scrierea și depanarea codului pentru a salva tipuri de date complicate în fișiere, Python vă permite să utilizați formatul popular de schimb de date numit&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference external&quot; href=&quot;http://json.org/&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;JSON (JavaScript Object Notation)&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Modulul standard denumit&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/json.html#module-json&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;json: codificați și decodați formatul JSON.&quot;&gt;&lt;tt class=&quot;xref py py-mod docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;json&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;poate lua ierarhiile de date Python și le poate converti în reprezentări de șir;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;acest proces se numește&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em class=&quot;dfn&quot;&gt;serializare&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Reconstruirea datelor din reprezentarea șirului se numește&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em class=&quot;dfn&quot;&gt;deserializare&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Între serializarea și deserializarea, șirul reprezentând obiectul ar fi putut fi stocat într-un fișier sau date sau trimis printr-o conexiune de rețea la o anumită mașină îndepărtată.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;admonition note&quot; style=&quot;background-color: #eeeeee; border-radius: 3px; border: 1px solid rgb(204, 204, 204); margin-bottom: 10px; margin-top: 10px; padding: 7px;&quot;&gt;
&lt;div class=&quot;first admonition-title&quot; style=&quot;display: inline; font-weight: bold; line-height: 22.4px; margin-bottom: 5px; margin-right: 10px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Notă&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;last&quot; style=&quot;display: inline; line-height: 22.4px; margin-bottom: 5px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Formatul JSON este utilizat în mod obișnuit de aplicații moderne pentru a permite schimbul de date.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Mulți programatori sunt deja familiarizați cu acesta, ceea ce îl face o alegere bună pentru interoperabilitate.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă aveți un obiect&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;x&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, puteți vizualiza reprezentarea șirului JSON cu o linie simplă de cod:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;json &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;haldele &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;([ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;simplu&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;listă&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&quot;[1,&quot; simplu &quot;,&quot; listă &quot;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;O altă variantă a funcției&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/json.html#json.dumps&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;json.dumps&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;dumps ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, denumită&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/json.html#json.dump&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;json.dump&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;dump ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, serializează pur și simplu obiectul într-un&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/glossary.html#term-text-file&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em class=&quot;xref std std-term&quot;&gt;fișier text&lt;/em&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Deci, dacă&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;f&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este un&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;obiect de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/glossary.html#term-text-file&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em class=&quot;xref std std-term&quot;&gt;fișier text&lt;/em&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;deschis pentru scriere, putem face acest lucru:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;n&quot;&gt;json &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dump &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;f &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pentru a decoda obiectul din nou, dacă&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;f&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este un&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;obiect de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/glossary.html#term-text-file&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em class=&quot;xref std std-term&quot;&gt;fișier text&lt;/em&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;care a fost deschis pentru citire:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;n&quot;&gt;x &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;json &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sarcină &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;f &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Această tehnică de serializare simplă poate gestiona liste și dicționare, însă serializarea instanțelor de clasă arbitrare din JSON necesită un efort suplimentar.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Referința pentru&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;modulul&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/json.html#module-json&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;json: codificați și decodați formatul JSON.&quot;&gt;&lt;tt class=&quot;xref py py-mod docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;json&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;conține o explicație a acestui lucru.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;admonition seealso&quot; style=&quot;background-color: #ffffcc; border-radius: 3px; border: 1px solid rgb(221, 221, 102); margin-bottom: 10px; margin-top: 10px; padding: 7px;&quot;&gt;
&lt;div class=&quot;first admonition-title&quot; style=&quot;display: inline; font-weight: bold; line-height: 22.4px; margin-bottom: 5px; margin-right: 10px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Vezi si&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;display: inline; line-height: 22.4px; margin-bottom: 5px; text-align: justify;&quot;&gt;
&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/pickle.html#module-pickle&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;pickle: Convertiți obiectele Python în fluxuri de octeți și înapoi.&quot;&gt;&lt;tt class=&quot;xref py py-mod docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pickle&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;- modulul pickle&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;last&quot; style=&quot;line-height: 22.4px; margin-bottom: 5px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Spre deosebire de&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/inputoutput.html#tut-json&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em&gt;JSON&lt;/em&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;,&amp;nbsp;&lt;/span&gt;&lt;em&gt;pickle&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este un protocol care permite serializarea obiectelor Python arbitrar complexe.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Ca atare, este specific pentru Python și nu poate fi folosit pentru a comunica cu aplicații scrise în alte limbi.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Este, de asemenea, nesigur în mod implicit: deserializarea datelor de muraturi care provin dintr-o sursă neîncrezătoare pot executa un cod arbitrar, dacă datele au fost create de un atacator calificat.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/h1&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h1&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;8. Erori și excepții&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/errors.html#errors-and-exceptions&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div style=&quot;color: #222222; font-size: 16px; line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Până acum mesajele de eroare nu au fost mai mult decât menționate, dar dacă ați încercat exemplele pe care le-ați văzut probabil unele.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Există (cel puțin) două tipuri de erori distincte:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;erori de sintaxă&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și&amp;nbsp;&lt;/span&gt;&lt;em&gt;excepții&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;/span&gt;&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 25.6px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;8.1.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Erori de sintaxă&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/errors.html#syntax-errors&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; id=&quot;syntax-errors&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;span id=&quot;tut-syntaxerrors&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Erorile de sintaxă, cunoscute și sub numele de erori de parsing, sunt probabil cele mai comune tipuri de reclamații pe care le obțineți în timp ce învățați încă Python:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; în &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;timp ce &lt;/span&gt; &lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;Print &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;True &lt;/span&gt; &lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;( &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&quot;Bună ziua&quot; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;) &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;go&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;  Fișier &quot;&amp;lt;stdin&amp;gt;&quot;, linia 1, în? &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;go&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;    în timp ce True print (&#39;Hello world&#39;) &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;go&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;                   ^ &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;go&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;SyntaxError: sintaxă invalidă&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Parserul repetă linia infracțională și afișează o mică &quot;săgeată&quot; care indică cel mai devreme punct din linia unde a fost detectată eroarea.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Eroarea este cauzată de (sau cel puțin detectată) de tokenul&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;precedent&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;de săgeată: în exemplu, eroarea este detectată la funcția&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#print&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;imprimare&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;print ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, deoarece un colon (&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&#39;:&#39;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;) lipsește înainte de aceasta.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Numele fișierului și numărul liniei sunt tipărite, astfel încât să știți unde să căutați în cazul în care intrarea a venit dintr-un script.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 25.6px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;8.2.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Excepții&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/errors.html#exceptions&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; id=&quot;exceptions&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;span id=&quot;tut-exceptions&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Chiar dacă o declarație sau o expresie este corectă din punct de vedere sintactic, poate provoca o eroare atunci când se face o încercare de ao executa.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Erori detectate în timpul execuției sunt numite&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;excepții&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și nu sunt necondiționat fatale: în curând veți afla cum să le gestionați în programele Python.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Cele mai multe excepții nu sunt tratate de programe, cu toate acestea, și rezultă în mesaje de eroare, după cum se arată aici:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;10 &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;* &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;/ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;0 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gt&quot; style=&quot;color: #0044dd;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Traceback (apel cele &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;mai recente Ultima): &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
  Fișier &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;&quot;&amp;lt;stdin&amp;gt;&quot; &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;, linia &lt;/span&gt;&lt;span class=&quot;m&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;, în &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;? &lt;/span&gt;
&lt;span class=&quot;gr&quot; style=&quot;color: red;&quot;&gt;ZeroDivisionError &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;: &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;împărțire la zero &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;4 &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;+ &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;spam &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;* &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;3 &lt;/span&gt;
&lt;span class=&quot;gt&quot; style=&quot;color: #0044dd;&quot;&gt;Traceback (ultimul apel ultimul): &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
  Fișierul &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;&quot;&amp;lt;stdin&amp;gt;&quot; &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;, linia &lt;/span&gt;&lt;span class=&quot;m&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;, în &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;? &lt;/span&gt;
&lt;span class=&quot;gr&quot; style=&quot;color: red;&quot;&gt;NumeError &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;: &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;numele &quot;spam&quot; nu este definit &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;2&#39; &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;+ &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;
&lt;span class=&quot;gt&quot; style=&quot;color: #0044dd;&quot;&gt;Traceback (cel mai recent apel ultimul): &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
  Fișierul &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;&quot;&amp;lt;stdin&amp;gt;&quot;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;m&quot; style=&quot;color: #208050;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;, în &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;? &lt;/span&gt;
&lt;span class=&quot;gr&quot; style=&quot;color: red;&quot;&gt;TypeError &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;: &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Imposibil de convertit obiectul &#39;int&#39; la str implicit&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Ultimul rând al mesajului de eroare indică ce sa întâmplat.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Excepțiile vin în diferite tipuri, iar tipul este tipărit ca parte a mesajului: tipurile din exemplu sunt&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/exceptions.html#ZeroDivisionError&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;ZeroDivisionError&quot;&gt;&lt;tt class=&quot;xref py py-exc docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;ZeroDivisionError&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;,&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/exceptions.html#NameError&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;NameError&quot;&gt;&lt;tt class=&quot;xref py py-exc docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;NameError&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/exceptions.html#TypeError&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;Eroare de scris&quot;&gt;&lt;tt class=&quot;xref py py-exc docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;TypeError&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Șirul imprimat ca tip de excepție este numele excepției integrate care a apărut.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest lucru este valabil pentru toate excepțiile integrate, dar nu este necesar să fie adevărat pentru excepțiile definite de utilizator (deși este o convenție utilă).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Numele excepționale standard sunt identificatorii încorporați (nu sunt cuvinte cheie rezervate).&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Restul liniei oferă detalii pe baza tipului de excepție și a ceea ce a cauzat-o.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Partea anterioară a mesajului de eroare arată contextul în care sa produs excepția, sub forma unei traseback de stivă.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În general, acesta conține o linie de sursă a liniei sursă de traseback;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;cu toate acestea, nu va afișa liniile citite de la intrarea standard.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/exceptions.html#bltin-exceptions&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em&gt;Excepțiile&lt;/em&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;construite listează&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/exceptions.html#bltin-exceptions&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;excepțiile&lt;/span&gt;&lt;/em&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;încorporate și semnificațiile acestora.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 25.6px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;8.3.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Excepții de manipulare&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/errors.html#handling-exceptions&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; id=&quot;handling-exceptions&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;span id=&quot;tut-handling&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Este posibil să scrieți programe care să trateze excepțiile selectate.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Uitați-vă la exemplul următor, care solicită utilizatorului introducerea până la introducerea unui număr întreg valid, dar permite utilizatorului să întrerupă programul (folosind&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;kbd docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Control-C&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;sau orice suport acceptă sistemul de operare);&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;rețineți că o întrerupere generată de utilizator este semnalizată prin ridicarea&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;excepției&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/exceptions.html#KeyboardInterrupt&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;KeyboardInterrupt&quot;&gt;&lt;tt class=&quot;xref py py-exc docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;KeyboardInterrupt&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; în &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;timp ce &lt;/span&gt; &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;Adevărat &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;încercați &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;        &lt;span class=&quot;n&quot;&gt;x &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;int &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;introduceți &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;Introduceți un număr:&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;        &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pauză &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;cu excepția &lt;/span&gt; &lt;span class=&quot;ne&quot; style=&quot;color: #007020;&quot;&gt;ValueError &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;        &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;Oops! un număr valid, încercați din nou ... &quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;...&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Instrucțiunea&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#try&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;try&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;funcționează după cum urmează.&lt;/span&gt;&lt;/div&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În primul rând,&amp;nbsp;&lt;/span&gt;&lt;em&gt;clauza try&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;(declarația (e) între&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#try&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;încercare&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și cu&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#except&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;excepția&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;cuvintelor cheie) este executat.&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă nu se produce nicio excepție,&amp;nbsp;&lt;/span&gt;&lt;em&gt;clauza&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;excepțională&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;este omisă și executarea&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;instrucțiunii&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#try&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;try&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este terminată.&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă se produce o excepție în timpul executării clauzei de încercare, restul clauzei este omisă.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Apoi , în&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;cazul în care&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;tipul său se&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;potrivește cu excepția numit după&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#except&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;excepția&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;cuvintelor cheie, clauza except este executat, iar apoi de&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;execuție este&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;după&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#try&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;încercare&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;declarația.&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă apare o excepție care nu se potrivește cu excepția numită în clauza excepțională, aceasta este transmisă unor&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;instrucțiuni&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;exterioare de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#try&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;încercare&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;dacă nu se găsește niciun manipulator, este o&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;excepție nefolosită&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și execuția se oprește cu un mesaj așa cum este arătat mai sus.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;O&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;instrucțiune&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#try&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;try&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;poate avea mai mult de o excepție, cu excepția clauzei, pentru a specifica manipulatorii pentru diferite excepții.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;La cel mult un handler va fi executat.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Handlerele gestionează exclusiv excepțiile care apar în clauza de încercare corespunzătoare, nu și în alte manipulatoare ale aceleiași&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;instrucțiuni de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#try&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;încercare&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;O clauză excepțională poate numi mai multe excepții ca o paranteză paranteză, de exemplu:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;... &lt;/span&gt; &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;cu excepția &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;ne&quot; style=&quot;color: #007020;&quot;&gt;RuntimeError &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;ne&quot; style=&quot;color: #007020;&quot;&gt;TypeError &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;ne&quot; style=&quot;color: #007020;&quot;&gt;NameError &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;... &lt;/span&gt;     &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pass&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Ultimul, cu excepția clauzei, poate omite numele de excepție, pentru a servi drept wildcard.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Utilizați acest lucru cu precauție extremă, deoarece este ușor să mascați o eroare de programare reală în acest fel!&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De asemenea, poate fi folosit pentru a imprima un mesaj de eroare și apoi re-ridicați excepția (permițând unui apelant să facă față și excepției):&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;kn&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;import &lt;/span&gt; &lt;span class=&quot;nn&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;sys&lt;/span&gt;

&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;încercați &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;f &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;open &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;myfile.txt&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;s &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;f &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;readline &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;() &lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;i &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;int &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;s &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;benzi &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()) cu &lt;/span&gt;
&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;excepția &lt;/span&gt; &lt;span class=&quot;ne&quot; style=&quot;color: #007020;&quot;&gt;IOError &lt;/span&gt; &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;ca &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;err &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;eroare I / O: {0}&quot; &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;format &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;err &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)) cu &lt;/span&gt;
&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;excepția &lt;/span&gt; &lt;span class=&quot;ne&quot; style=&quot;color: #007020;&quot;&gt;ValueError &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;„Nu am putut converti datele la un întreg. &quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;cu excepția &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot; Eroare neașteptată: &quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sys &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;exc_info &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;() [ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;0 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]) &lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;crește&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#try&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Încercare&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;... cu&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#except&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;excepția&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;declarație are o opțională&amp;nbsp;&lt;/span&gt;&lt;em&gt;clauză else&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, care, atunci când este&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;prezent, trebuie să urmeze toate , cu&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;excepția clauzelor.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Este util pentru codul care trebuie executat dacă clauza de încercare nu ridică o excepție.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;arg &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sys &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;argv &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:]: &lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;încercați &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;f &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;deschis &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;arg &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;r&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) , cu &lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;excepția &lt;/span&gt; &lt;span class=&quot;ne&quot; style=&quot;color: #007020;&quot;&gt;IOError &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
        &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;imprimare &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&#39;nu se &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;poate deschide&#39; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;arg &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;altceva &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: de &lt;/span&gt;
        &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;imprimare &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;arg &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;are&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;len &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;f &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;readlines &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()), &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot; linii &quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;f &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;închide &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Utilizarea&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#else&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;altfel&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;clauza este mai bună decât adăugarea de&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;cod suplimentar la&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#try&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;încercare&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;clauza deoarece evită prinderea în mod&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;accidental o excepție care nu a&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;fost ridicată de codul fiind protejat de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#try&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;încercare&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;... cu&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#except&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;excepția&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;declarație.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Când apare o excepție, poate avea o valoare asociată, cunoscută și ca&amp;nbsp;&lt;/span&gt;&lt;em&gt;argumentul&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;excepției&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Prezența și tipul argumentului depind de tipul excepției.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Clauza excepțională poate specifica o variabilă după numele excepției.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Variabila este legată de o instanță de excepție cu argumentele stocate în&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;instanța.args&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pentru comoditate, instanța de excepție definește&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/datamodel.html#object.__str__&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;obiect .__ str__&quot;&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;__str __ ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;astfel încât argumentele pot fi imprimate direct fără a fi nevoie să se&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;facă&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;referință&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;.args&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De asemenea, se poate instantiza o exceptie inainte de ao ridica si de a adauga orice atribut dupa dorinta.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;încercați &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;   &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;ridica &lt;/span&gt; &lt;span class=&quot;ne&quot; style=&quot;color: #007020;&quot;&gt;excepție &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&#39;spam - &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;ului&#39; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;ouă&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... cu &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;excepția &lt;/span&gt; &lt;span class=&quot;ne&quot; style=&quot;color: #007020;&quot;&gt;Excepție &lt;/span&gt; &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;ca &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;inst &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... de &lt;/span&gt;   &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;imprimare &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( de &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;tip &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Inst &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)) &lt;/span&gt;    &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;# excepției de &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;exemplu &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;   &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;imprimare &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;inst &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Args &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;     &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# argumente stocate în .args &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;   &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;inst &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;          &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# __str__ permite args să fie imprimate direct, &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;                        &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# dar pot fi suprascrise în subclasele de excepție &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;   &lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;inst &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ARGS &lt;/span&gt;     &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# despachetați args &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;   &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;x =&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;   &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;y =&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&amp;lt;class &#39;Excepție&#39;&amp;gt; &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;( &#39;spam &#39;ouă&#39;) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;( &quot;spam , &quot;ouă&quot;) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;x = spam &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;y = ouă&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă o excepție are argumente, ele sunt tipărite ca ultima parte (&quot;detaliu&quot;) a mesajului pentru excepții nefolosite.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Excepții de manipulare nu se ocupă doar de excepții dacă apar imediat în clauza de încercare, dar și în cazul în care apar în interiorul funcțiilor care sunt numite (chiar indirect) în clauza de încercare.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;def &lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;this_fails &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(): &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;n&quot;&gt;x &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;/ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;0 &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;try &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;n&quot;&gt;this_fails &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;() &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... cu &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;excepția &lt;/span&gt; &lt;span class=&quot;ne&quot; style=&quot;color: #007020;&quot;&gt;ZeroDivisionError &lt;/span&gt; &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;ca &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ERR &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... de &lt;/span&gt;    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;imprimare &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;„eroare de &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;manipulare run-time: &quot; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;err &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;Manipularea erorii run-time: int divizare sau modulo la zero&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 25.6px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;8.4.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Ridicarea excepțiilor&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/errors.html#raising-exceptions&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; id=&quot;raising-exceptions&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;span id=&quot;tut-raising&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Instrucțiunea de&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/simple_stmts.html#raise&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;creare&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;permite programatorului să forțeze o excepție specificată.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;ridica &lt;/span&gt; &lt;span class=&quot;ne&quot; style=&quot;color: #007020;&quot;&gt;Traseback NameError &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;HiThere&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gt&quot; style=&quot;color: #0044dd;&quot;&gt;(ultimul apel ultimul): &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
  Fișierul &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;&quot;&amp;lt;stdin&amp;gt;&quot; &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;, linia &lt;/span&gt;&lt;span class=&quot;m&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;, în &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;? &lt;/span&gt;
&lt;span class=&quot;gr&quot; style=&quot;color: red;&quot;&gt;NumeError &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;: &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;HiThere&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Singurul argument pe care îl&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/simple_stmts.html#raise&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;ridică&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;indică excepția care trebuie ridicată.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Aceasta trebuie să fie o instanță de excepție sau o clasă de excepție (o clasă care derivă din&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/exceptions.html#Exception&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;Excepție&quot;&gt;&lt;tt class=&quot;xref py py-class docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Excepție&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;).&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă trebuie să determinați dacă a fost ridicată o excepție, dar nu intenționați să o gestionați, o formă mai simplă a&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;instrucțiunii de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/simple_stmts.html#raise&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;ridicare&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;vă permite să re-ridicați excepția:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;încercați &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;ridica &lt;/span&gt; &lt;span class=&quot;ne&quot; style=&quot;color: #007020;&quot;&gt;NameError &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;HiThere&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;cu excepția &lt;/span&gt; &lt;span class=&quot;ne&quot; style=&quot;color: #007020;&quot;&gt;NameError &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;O excepție a zburat!&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;ridica &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;O excepție a zburat! &lt;/span&gt;
&lt;span class=&quot;gt&quot; style=&quot;color: #0044dd;&quot;&gt;Traceback (cel mai recent apel ultimul): &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
  Fișierul &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;&quot;&amp;lt;stdin&amp;gt;&quot; &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;, linia &lt;/span&gt;&lt;span class=&quot;m&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;, în &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;? &lt;/span&gt;
&lt;span class=&quot;gr&quot; style=&quot;color: red;&quot;&gt;NumeError &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;: &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;HiThere&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 25.6px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;8.5.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Excepții definite de utilizator&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/errors.html#user-defined-exceptions&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; id=&quot;user-defined-exceptions&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;span id=&quot;tut-userexceptions&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Programele își pot numi excepțiile prin crearea unei noi clase de excepție (consultați&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#tut-classes&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em&gt;clasele&lt;/em&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;pentru mai multe despre clasele Python).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Excepțiile ar trebui, de obicei, să fie derivate din&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;clasa de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/exceptions.html#Exception&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;Excepție&quot;&gt;&lt;tt class=&quot;xref py py-exc docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;excepție&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;, direct sau indirect.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;clasa &lt;/span&gt; &lt;span class=&quot;nc&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;MyError &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;ne&quot; style=&quot;color: #007020;&quot;&gt;excepție &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;def &lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;__init__ &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;sine &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;valoare &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;        &lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;sine &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Valoarea &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;valoarea &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;def &lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;__str__ &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;auto &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;        &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;întoarcere &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;Repr &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;auto &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;valoare &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;încercați &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;ridica &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;MyError &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;* &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... cu &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;excepția &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;MyError &lt;/span&gt; &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;ca &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;e &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... de &lt;/span&gt;    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;imprimare &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&#39;excepție mea a &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;avut loc, valoarea:&#39; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;e &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Valoarea &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;excepție mea a &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;avut loc, valoarea: 4 &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;ridica &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;MyError &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;! Oops&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gt&quot; style=&quot;color: #0044dd;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Traceback (apel cele &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;mai recente Ultima): &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
  Fișier &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;„&amp;lt; stdin&amp;gt; &quot; &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;, linia &lt;/span&gt;&lt;span class=&quot;m&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;, în &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;? &lt;/span&gt;
&lt;span class=&quot;gr&quot; style=&quot;color: red;&quot;&gt;__main __. MyError &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;: &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&quot;Oops!&quot;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În acest exemplu, valoarea implicită&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/datamodel.html#object.__init__&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;opoziție .__ init__&quot;&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;__init __ ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;a&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/exceptions.html#Exception&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;Excepție&quot;&gt;&lt;tt class=&quot;xref py py-class docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;excepției&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;a fost înlocuită.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Noul comportament creează pur și simplu&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;atributul&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;value&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Aceasta înlocuiește comportamentul implicit al creării&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;atributului&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;args&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Clasele de excepție pot fi definite care fac ceea ce poate face orice altă clasă, dar de obicei sunt păstrate simple, adesea oferind doar un număr de atribute care permit ca informațiile despre eroare să fie extrase de către manipulanți pentru excepție.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Când se creează un modul care poate genera mai multe erori distincte, o practică obișnuită este crearea unei clase de bază pentru excepțiile definite de acel modul și a unei subclase care să creeze clase excepționale specifice pentru diferite condiții de eroare:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;Clasa de &lt;/span&gt; &lt;span class=&quot;nc&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;eroare &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;ne&quot; style=&quot;color: #007020;&quot;&gt;Excepție &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
    &lt;span class=&quot;sd&quot; style=&quot;color: #4070a0; font-style: italic;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;„“ „clasa de &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;baza pentru excepții în acest modul“ „“ &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;trecere&lt;/span&gt;

&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;class &lt;/span&gt; &lt;span class=&quot;nc&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;InputError &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Error &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
    &lt;span class=&quot;sd&quot; style=&quot;color: #4070a0; font-style: italic;&quot;&gt;&quot;&quot; &quot;Excepție ridicată pentru erori la intrare.&lt;/span&gt;

&lt;span class=&quot;sd&quot; style=&quot;color: #4070a0; font-style: italic;&quot;&gt;    Atribute: &lt;/span&gt;
&lt;span class=&quot;sd&quot; style=&quot;color: #4070a0; font-style: italic;&quot;&gt;        expresie - expresie de intrare în care a apărut &lt;/span&gt;
&lt;span class=&quot;sd&quot; style=&quot;color: #4070a0; font-style: italic;&quot;&gt;        mesajul &lt;/span&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span class=&quot;sd&quot; style=&quot;color: #4070a0; font-style: italic;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;eroare &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;sd&quot; style=&quot;color: #4070a0; font-style: italic;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;- explicarea erorii &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;sd&quot; style=&quot;color: #4070a0; font-style: italic;&quot;&gt;    &quot;&quot; &quot;&lt;/span&gt;

    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;def &lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;__init__ &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;sine &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;expresie &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;mesaj &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
        &lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;sine &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;expresie &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;expresie de &lt;/span&gt;
        &lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;sine &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;mesaj &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;mesaj&lt;/span&gt;

&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;Class &lt;/span&gt; &lt;span class=&quot;nc&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;TransitionError &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Error &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
    &lt;span class=&quot;sd&quot; style=&quot;color: #4070a0; font-style: italic;&quot;&gt;&quot;&quot; Crescut atunci când o operație încearcă o tranziție de stat care nu este &lt;/span&gt;
&lt;span class=&quot;sd&quot; style=&quot;color: #4070a0; font-style: italic;&quot;&gt;    permisă.&lt;/span&gt;

&lt;span class=&quot;sd&quot; style=&quot;color: #4070a0; font-style: italic;&quot;&gt;    Atribute: &lt;/span&gt;
&lt;span class=&quot;sd&quot; style=&quot;color: #4070a0; font-style: italic;&quot;&gt;        precedent - starea de la începutul tranziției &lt;/span&gt;
&lt;span class=&quot;sd&quot; style=&quot;color: #4070a0; font-style: italic;&quot;&gt;        următoare - încercarea unui nou &lt;/span&gt;
&lt;span class=&quot;sd&quot; style=&quot;color: #4070a0; font-style: italic;&quot;&gt;        mesaj de &lt;/span&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span class=&quot;sd&quot; style=&quot;color: #4070a0; font-style: italic;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;stare &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;sd&quot; style=&quot;color: #4070a0; font-style: italic;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;- explicarea motivului pentru care nu este permisă tranziția specifică &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;sd&quot; style=&quot;color: #4070a0; font-style: italic;&quot;&gt;    &quot;&quot; &quot;&lt;/span&gt;

    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;def &lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;__init__ &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;sine &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;precedent &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;următor &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;mesaj &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
        &lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;sine &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;anterior &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;anterior de &lt;/span&gt;
        &lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;sine &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;next &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;next &lt;/span&gt;
        &lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;sine &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;mesaj &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;mesaj&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Cele mai multe excepții sunt definite cu nume care se termină în &quot;Eroare&quot;, similar cu denumirea excepțiilor standard.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Multe module standard definesc propriile excepții de a raporta erorile care pot apărea în funcțiile pe care le definesc.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Mai multe informații despre clase sunt prezentate în capitolele&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#tut-classes&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em&gt;Clase&lt;/em&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 25.6px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;8.6.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Definirea acțiunilor de curățare&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/errors.html#defining-clean-up-actions&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; id=&quot;defining-clean-up-actions&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;span id=&quot;tut-cleanup&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Instrucțiunea&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#try&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;try&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;are o altă clauză opțională, care este destinată să definească acțiunile de curățare care trebuie executate în toate circumstanțele.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;încercați &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;ridicați &lt;/span&gt; &lt;span class=&quot;ne&quot; style=&quot;color: #007020;&quot;&gt;KeyboardInterrupt &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... în &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;sfârșit &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;La revedere, lumea!&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;La revedere, lume! &lt;/span&gt;
&lt;span class=&quot;nc&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;KeyboardInterrupt&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;O&amp;nbsp;&lt;/span&gt;&lt;em&gt;clauză finală&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este întotdeauna executată înainte de a părăsi&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;instrucțiunea&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#try&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;try&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, indiferent dacă a apărut o excepție sau nu.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Atunci când a avut loc o excepție în&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#try&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;încercați&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;clauza și nu a fost tratată printr -&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;o , cu&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#except&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;excepția&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;clauza (sau a avut loc într -&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;o&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#except&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;afară&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;sau&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#else&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;altceva&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;clauza), acesta este re-raise după ce în&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#finally&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;cele din&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;urmă&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;clauza a fost executată.&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#finally&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În cele din&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;urmă&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;clauză este , de&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;asemenea ,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;executat „pe cale de&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;ieșire“ ,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;atunci când orice altă clauză de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#try&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;încercare&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;declarația este lăsată printr -&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;o&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/simple_stmts.html#break&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pauză&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, să&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/simple_stmts.html#continue&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;continue&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;sau a&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/simple_stmts.html#return&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;reveni&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;declarație.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Un exemplu mai complicat:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;def &lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;divide &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;încercați &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;        &lt;span class=&quot;n&quot;&gt;rezultatul &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;/ &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... cu &lt;/span&gt;    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;excepția &lt;/span&gt; &lt;span class=&quot;ne&quot; style=&quot;color: #007020;&quot;&gt;ZeroDivisionError &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;        &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;Print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&quot;diviziune de la &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;zero!&quot; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;altceva &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;        &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;rezultatul este&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;rezultat &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... în &lt;/span&gt;    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;cele din urmă &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;        &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;executând definitiv clauza&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;divide &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;rezultatul este 2.0 &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;executând în cele din urmă clauza &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;diviziunea &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;0 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;împărțirea la zero! &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;executând în final clauza &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;divide &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;2&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;1&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;executând în cele din urmă clauza &lt;/span&gt;
&lt;span class=&quot;gt&quot; style=&quot;color: #0044dd;&quot;&gt;Traceback (ultimul apel ultimul): &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
  Fișier &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;&quot;&amp;lt;stdin&amp;gt;&quot; &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;, rândul &lt;/span&gt;&lt;span class=&quot;m&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;, în &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;? &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
  Fișierul &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;&quot;&amp;lt;stdin&amp;gt;&quot; &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;, rândul &lt;/span&gt;&lt;span class=&quot;m&quot; style=&quot;color: #208050;&quot;&gt;3 &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;, în &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;diviziune &lt;/span&gt;
&lt;span class=&quot;gr&quot; style=&quot;color: red;&quot;&gt;TypeError &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;: &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;tipuri de operand neacceptate pentru /: &#39;str&#39; și &#39;str&#39;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;După cum puteți vedea,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;clauza&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#finally&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;finală&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este executată în orice caz.&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/exceptions.html#TypeError&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;Eroare de scris&quot;&gt;&lt;tt class=&quot;xref py py-exc docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;TypeError&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;ridicată prin împărțirea două șiruri nu este tratată de către&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#except&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;excepția&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;clauzei și ,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;prin urmare ,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;reraise după ce în&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#finally&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;final&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;clauza a fost executată.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În aplicațiile din lumea reală,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;clauza&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#finally&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;finală&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este utilă pentru eliberarea de resurse externe (cum ar fi fișiere sau conexiuni de rețea), indiferent dacă utilizarea resurselor a avut succes.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 25.6px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;8.7.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acțiuni de curățare predefinite&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/errors.html#predefined-clean-up-actions&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;div class=&quot;section&quot; id=&quot;predefined-clean-up-actions&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;
&lt;span id=&quot;tut-cleanup-with&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Unele obiecte definesc acțiunile standard de curățare care trebuie întreprinse atunci când obiectul nu mai este necesar, indiferent dacă operația care utilizează obiectul a reușit sau nu a reușit.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Uitați-vă la următorul exemplu, care încearcă să deschidă un fișier și să imprime conținutul acestuia pe ecran.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;linia &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;deschisă &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;myfile.txt&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;imprimare &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;linia &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;end &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Problema cu acest cod este că ea lasă fișierul deschis pentru o perioadă nedeterminată de timp după ce această parte a codului a terminat executarea.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Aceasta nu este o problemă în scenarii simple, dar poate fi o problemă pentru aplicațiile mai mari.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Instrucțiunea&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#with&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;cu&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;permite ca obiectele ca fișierele să fie utilizate într-un mod care să asigure că acestea sunt întotdeauna curățate prompt și corect.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;cu &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;open &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;myfile.txt&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt; &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;ca &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;f &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;linia &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;f &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
        &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;linia &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;capăt &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;După executarea instrucțiunii, fișierul&amp;nbsp;&lt;/span&gt;&lt;em&gt;f&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este întotdeauna închis, chiar dacă a apărut o problemă în timpul procesării liniilor.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Obiectele care, ca fișiere, oferă acțiuni de curățare predefinite, vor indica acest lucru în documentația lor.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/h1&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h1&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #1a1a1a; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;9. Clasele&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#classes&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În comparație cu alte limbi de programare, mecanismul clasei Python adaugă clase cu un minim de sintaxă și semantică noi.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Este un amestec al mecanismelor de clasă descoperite în C ++ și Modula-3.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Clasele Python oferă toate caracteristicile standard ale programării orientate pe obiecte: mecanismul de moștenire a clasei permite mai multor clase de bază, o clasă derivată poate suprascrie orice metodă a clasei sau clasei sale de bază și o metodă poate apela metoda unei clase de bază cu același nume .&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Obiectele pot conține cantități arbitrare și tipuri de date.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Așa cum este valabil și pentru module, clasele participă la natura dinamică a Python: ele sunt create în timpul execuției și pot fi modificate ulterior după crearea.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În terminologia C ++, în mod normal, membrii clasei (inclusiv membrii de date) sunt&amp;nbsp;&lt;/span&gt;&lt;em&gt;publici&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;(cu excepția celor de mai jos&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#tut-private&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em&gt;, Variabile private&lt;/em&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;) și toate funcțiile membre sunt&amp;nbsp;&lt;/span&gt;&lt;em&gt;virtuale&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Ca și în Modula-3, nu există contorii pentru referirea membrilor obiectului din metodele sale: funcția de metodă este declarată cu un prim argument explicit reprezentând obiectul, care este furnizat implicit de apel.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Ca și în Smalltalk, clasele sunt obiecte.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Aceasta oferă semantică pentru import și redenumire.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Spre deosebire de C ++ și Modula-3, tipurile încorporate pot fi folosite ca clase de bază pentru extensie de către utilizator.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De asemenea, ca în C ++, majoritatea operatorilor încorporați cu sintaxă specială (operatori aritmetici, subscripting etc.) pot fi redefiniți pentru instanțe de clasă.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;(Lipsa terminologiei universal acceptate pentru a vorbi despre clase, voi folosi ocazional termenii Smalltalk și C ++. Aș folosi termeni Modula-3, deoarece semantica orientată pe obiecte este mai apropiată de cea a lui Python decât C ++, dar mă aștept ca puțini cititori au auzit de ea.)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;a-word-about-names-and-objects&quot; style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 16px;&quot;&gt;
&lt;span id=&quot;tut-object&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h2 style=&quot;border: 0px; color: #1a1a1a; font-size: 25.6px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;9.1.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Un cuvânt despre nume și obiecte&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#a-word-about-names-and-objects&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Obiectele au individualitate, iar mai multe nume (în mai multe domenii) pot fi legate la același obiect.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Aceasta este cunoscută sub numele de aliasing în alte limbi.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest lucru nu este de obicei apreciat la prima vedere la Python și poate fi ignorat în siguranță atunci când se ocupă cu tipuri de bază imuabile (numere, șiruri, tuple).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Cu toate acestea, aliasingul are un efect surprinzător posibil asupra semanticii codului Python care implică obiecte mutabile, cum ar fi listele, dicționarele și cele mai multe alte tipuri.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Aceasta este de obicei folosită în beneficiul programului, deoarece pseudonimurile se comportă ca indicii în anumite privințe.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu, trecerea unui obiect este ieftină, deoarece doar un indicator este trecut prin implementare;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;și dacă o funcție modifică un obiect trecut ca argument, apelantul va vedea schimbarea - aceasta elimină necesitatea existenței a două mecanisme diferite de trecere a argumentelor ca în Pascal.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;python-scopes-and-namespaces&quot; style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 16px;&quot;&gt;
&lt;span id=&quot;tut-scopes&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h2 style=&quot;border: 0px; color: #1a1a1a; font-size: 25.6px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;9.2.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Python Scopes și Namespaces&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#python-scopes-and-namespaces&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Înainte de a introduce clase, trebuie să vă spun mai întâi despre regulile de aplicare a Python.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Definițiile de clasă joacă niște trucuri îngrijite cu spații de nume și trebuie să știți cum funcționează domeniile și spațiile de nume pentru a înțelege pe deplin ce se întâmplă.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De altfel, cunoștințele despre acest subiect sunt utile pentru orice programator Python avansat.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Să începem cu câteva definiții.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Un&amp;nbsp;&lt;/span&gt;&lt;em&gt;spațiu de nume&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este o mapare de la nume la obiecte.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Cele mai multe spații de nume sunt implementate în prezent ca dicționare Python, dar în mod normal nu sunt vizibile în nici un fel (cu excepția performanței) și se pot schimba în viitor.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Exemple de spații de nume sunt: ​​setul de nume încorporate (care conțin funcții precum&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#abs&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;abs&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;abs ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și nume excepționale construite);&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;numele globale dintr-un modul;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;și numele locale într-o invocare a funcțiilor.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Într-un sens, mulțimea de atribute ale unui obiect formează și un spațiu de nume.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Lucrul important de știut despre spațiile de nume este că nu există absolut nicio legătură între numele în spații de nume diferite;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;de exemplu, două module diferite pot să definească o funcție&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;maximizată&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;fără confuzie - utilizatorii modulelor trebuie să o prefixeze cu numele modulului.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Apropo, folosesc&amp;nbsp;&lt;/span&gt;&lt;em&gt;atributul&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;cuvânt&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pentru orice nume care urmează un punct - de exemplu, în expresia&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;z.real&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;,&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;real&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este un atribut al obiectului&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;z&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În mod strict vorbind, referințele la nume în module sunt referințe atribute: în expresia&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;modname.funcname&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;,&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;modname&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este un obiect de module și&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;funcname&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;este un atribut al acestuia.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În acest caz se întâmplă o mapare simplă între atributele modulului și numele globale definite în modul: aceștia împărtășesc același spațiu de nume!&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;footnote-reference&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#id2&quot; id=&quot;id1&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;[1]&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Atributele pot fi doar pentru citire sau scriere.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În ultimul caz, este posibilă alocarea atributelor.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Atributele modulului sunt inscriptibile: puteți scrie&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;modname.the_answer&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;=&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;42&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Atributele de scriere pot fi șterse și cu&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;instrucțiunea&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/simple_stmts.html#del&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;del&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;del&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;modname.the_answer&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;va elimina atributul&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;xref py py-attr docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;the_answer&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;de la obiectul numit&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;modname&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Spațiile de nume sunt create în momente diferite și au durate diferite de viață.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Spațiul de nume care conține numele încorporate este creat atunci când interpretul Python pornește și nu este șters niciodată.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Spațiul de nume global pentru un modul este creat atunci când se citește definiția modulului;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;în mod normal, numerele de module ale modulelor durează și până când interpretul se oprește.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Instrucțiunile executate de invocarea de nivel superior a interpretului, fie citite dintr-un fișier script, fie interactiv, sunt considerate ca parte a unui modul numit&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/__main__.html#module-__main__&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;__main__: mediul în care se execută scriptul de nivel superior.&quot;&gt;&lt;tt class=&quot;xref py py-mod docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;__main__&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, deci au propriul lor spațiu de nume global.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;(Numele încorporate trăiesc de asemenea într-un modul, acest lucru se numește&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/builtins.html#module-builtins&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;builtins: modulul care furnizează spațiul de nume încorporat.&quot;&gt;&lt;tt class=&quot;xref py py-mod docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;builtins&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Spațiul de nume local pentru o funcție este creat atunci când funcția este apelată și șters atunci când funcția returnează sau ridică o excepție care nu este tratată în cadrul funcției.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;(De fapt, uitarea ar fi o modalitate mai bună de a descrie ce se întâmplă de fapt). Desigur, invocările recursive au fiecare propriul lor spațiu de nume local.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Un&amp;nbsp;&lt;/span&gt;&lt;em&gt;domeniu&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este o regiune textuală a unui program Python în care un spațiu de nume este direct accesibil.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&quot;Direct accesibil&quot; înseamnă că o referință necalificată la un nume încearcă să găsească numele în spațiul de nume.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Deși scopurile sunt determinate static, ele sunt folosite dinamic.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În orice moment în timpul execuției, există cel puțin trei domenii imbricate ale căror spații de nume sunt direct accesibile:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;domeniul de aplicare cel mai intim, care este căutat în primul rând, conține numele locale&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;domeniile oricărei funcții de închidere, care sunt căutate începând cu cel mai apropiat domeniu de aplicare, conțin nume non-locale, dar și non-globale&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;următorul domeniu de aplicare conține numele global al modulului curent&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;cel mai îndepărtat domeniu (ultimul căutat) este spațiul de nume care conține numele încorporate&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă un nume este declarat global, atunci toate referințele și alocările merg direct la domeniul de aplicare intermediar care conține numele global al modulului.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pentru a rebrand variabilele găsite în afara domeniului interior,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;se poate folosi declarația&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/simple_stmts.html#nonlocal&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;nonlocală&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;dacă nu sunt declarate nonlocale, acele variabile sunt doar pentru citire (încercarea de a scrie la o astfel de variabilă va crea pur și simplu o&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;nouă&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;variabilă locală în interiorul domeniului interior, lăsând neschimbată variabila externă identică).&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De obicei, domeniul de aplicare local se referă la numele local al funcției curente (textuale).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În afara funcțiilor, domeniul de aplicare local se referă la același spațiu de nume ca și domeniul global: spațiul de nume al modulului.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Definițiile de clasă plasează încă un spațiu de nume în domeniul de aplicare local.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Este important să ne dăm seama că domeniile sunt determinate textual: domeniul global al unei funcții definite într-un modul este spațiul de nume al modulului, indiferent de unde sau prin ce nume se numește funcția.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pe de altă parte, căutarea reală a numelor se face dinamic, la momentul executării - totuși, definiția limbii evoluează spre rezolvarea numelui static, la momentul &quot;compilației&quot;, deci nu vă bazați pe rezoluția dinamică a numelui!&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;(De fapt, variabilele locale sunt deja determinate static.)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;O chestiune specială a lui Python este că - dacă nu există nicio&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;declarație&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/simple_stmts.html#global&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;globală&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;- atribuțiile la nume intră întotdeauna în cel mai luminos scop.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Atribuțiile nu copiază date - ci doar leagă numele la obiecte.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Același lucru este valabil și pentru ștergeri: instruciunea&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;del&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;x&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;elimină legarea lui&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;x&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;din spațiul de nume referit de domeniul de aplicare local.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De fapt, toate operațiunile care introduc nume noi utilizează domeniul de aplicare local: în special,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;declarațiile de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/simple_stmts.html#import&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;import&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și definițiile funcțiilor leagă numele modulului sau al funcției în domeniul local.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Declarația&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/simple_stmts.html#global&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;globală&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;poate fi utilizată pentru a indica faptul că anumite variabile trăiesc în sfera globală și ar trebui să revină acolo;&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/simple_stmts.html#nonlocal&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;nelocal&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;declarație indică faptul că anumite variabile trăiesc într -&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;un domeniu de&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;aplicare împrejmuitor și ar trebui să fie de&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;rebound acolo.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;scopes-and-namespaces-example&quot;&gt;
&lt;span id=&quot;tut-scopeexample&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h3 style=&quot;border: 0px; color: #1a1a1a; font-size: 22.4px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;9.2.1.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Exemple de spații și nume de case&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#scopes-and-namespaces-example&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acesta este un exemplu care demonstrează modul de referință a diferitelor domenii și spații de nume și modul în care influența&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/simple_stmts.html#global&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;globală&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/simple_stmts.html#nonlocal&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;nelocală&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;afectează variația obligatorie:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;scope_test&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;():&lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;do_local&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;():&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;spam&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;local spam&quot;&lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;do_nonlocal&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;():&lt;/span&gt;
        &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;nonlocal&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;spam&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;spam&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;nonlocal spam&quot;&lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;do_global&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;():&lt;/span&gt;
        &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;global&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;spam&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;spam&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;global spam&quot;&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;spam&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;test spam&quot;&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;do_local&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;After local assignment:&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;spam&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;do_nonlocal&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;After nonlocal assignment:&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;spam&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;do_global&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;After global assignment:&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;spam&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;scope_test&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;In global scope:&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;spam&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Rezultatul exemplului de cod este:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-none&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;After local assignment: test spam
After nonlocal assignment: nonlocal spam
After global assignment: nonlocal spam
In global scope: global spam&lt;/pre&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Notă modul în care&amp;nbsp;&lt;/span&gt;&lt;em&gt;locale&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;alocare (care este implicit) nu a modificat&amp;nbsp;&lt;/span&gt;&lt;em&gt;scope_test&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;e legarea de&amp;nbsp;&lt;/span&gt;&lt;em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;spam -&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;ului&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/simple_stmts.html#nonlocal&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Nelocal&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;Atribuirea schimbat&amp;nbsp;&lt;/span&gt;&lt;em&gt;scope_test&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;e legarea&amp;nbsp;&lt;/span&gt;&lt;em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;spam -&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;ului&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, iar la&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/simple_stmts.html#global&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;nivel mondial&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;atribuirea schimbat legării la&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;nivel de&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;modul.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De asemenea, puteți vedea că nu a existat nici o obligație anterioară pentru&amp;nbsp;&lt;/span&gt;&lt;em&gt;spam&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;înainte de&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;atribuirea&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/simple_stmts.html#global&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;globală&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;a-first-look-at-classes&quot; style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 16px;&quot;&gt;
&lt;span id=&quot;tut-firstclasses&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h2 style=&quot;border: 0px; color: #1a1a1a; font-size: 25.6px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;9.3.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;O primă privire la clase&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#a-first-look-at-classes&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Clasele introduc un pic de sintaxă nouă, trei tipuri de obiecte noi și câteva semantici noi.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;class-definition-syntax&quot;&gt;
&lt;span id=&quot;tut-classdefinition&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h3 style=&quot;border: 0px; color: #1a1a1a; font-size: 22.4px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;9.3.1.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Sintaxa de definire a clasei&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#class-definition-syntax&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Cea mai simplă formă de definire a clasei arată astfel:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;ClassName&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;statement&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;.&lt;/span&gt;
    &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;.&lt;/span&gt;
    &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;.&lt;/span&gt;
    &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;statement&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;N&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Definițiile de clasă, cum ar fi definițiile funcțiilor (&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;declarațiile&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#def&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;def&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;) trebuie executate înainte de a avea vreun efect.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;(Ați putea plasa o definiție de clasă într-o ramură a unei&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;declarații&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#if&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;if&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;sau în interiorul unei funcții.)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În practică, afirmațiile din interiorul unei definiții de clasă vor fi, de obicei, definiții de funcții, dar alte declarații sunt permise și uneori utile - vom reveni la aceasta mai târziu.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Definițiile funcțiilor dintr-o clasă au, în mod normal, o formă specifică de listă de argumente, dictată de convențiile de apel pentru metode - din nou, acest lucru este explicat mai târziu.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Când se introduce o definiție de clasă, se creează un nou spațiu de nume și se utilizează ca domeniu de aplicare local - astfel, toate asignările la variabilele locale intră în acest nou spațiu de nume.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În particular, definițiile funcțiilor leagă numele aici pentru noua funcție.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Atunci când o definiție de clasă este lăsată în mod normal (prin capăt),&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;se creează&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;un&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;obiect de clasă&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acesta este, în principiu, un înveliș în jurul conținutului spațiului de nume creat de definiția clasei;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;vom afla mai multe despre obiectele de clasă în secțiunea următoare.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;S-a restabilit domeniul original original (cel în vigoare imediat înainte de definirea clasei), iar obiectul de clasă este legat aici de numele clasei din antetul de clasă definit (&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;xref py py-class docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;ClassName&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;din exemplu).&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;class-objects&quot;&gt;
&lt;span id=&quot;tut-classobjects&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h3 style=&quot;border: 0px; color: #1a1a1a; font-size: 22.4px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;9.3.2.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Obiecte de clasă&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#class-objects&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Elementele de clasă acceptă două tipuri de operațiuni: referințe atribute și instanțiere.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;em&gt;Referințele atributelor&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;utilizează sintaxa standard folosită pentru toate referințele atributelor din Python:&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;obj.name&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Numele de atribute valide sunt toate numele care au fost în spațiul de nume al clasei atunci când a fost creat obiectul de clasă.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Deci, dacă definiția clasei arăta astfel:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;MyClass&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;sd&quot; style=&quot;color: #4070a0; font-style: italic;&quot;&gt;&quot;&quot;&quot;A simple example class&quot;&quot;&quot;&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;12345&lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
        &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;hello world&#39;&lt;/span&gt;&lt;/pre&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;apoi&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;MyClass.i&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;MyClass.f&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;sunt referințe de atribute valide, returnând un întreg și un obiect de funcție, respectiv.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De asemenea, pot fi atribuite atribute ale clasei, astfel încât să puteți schimba valoarea lui&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;MyClass.i&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;prin alocare.&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;xref py py-attr docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;__doc__&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este, de asemenea, un atribut valabil, returnând docstring aparținând clasei:&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&quot;O&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;clasă de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;exemple&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;simple&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;em&gt;Inițializarea&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;clasei&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;utilizează notația funcției.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Doar pretindeți că obiectul de clasă este o funcție fără parametri care returnează o nouă instanță a clasei.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu (presupunând clasa de mai sus):&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;n&quot;&gt;x &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;MyClass &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;creează o nouă&amp;nbsp;&lt;/span&gt;&lt;em&gt;instanță&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;a clasei și atribuie acest obiect variabilei locale&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;x&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Operația de instanțiere (&quot;apelarea&quot; unui obiect de clasă) creează un obiect gol.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Multe clase le place să creeze obiecte cu instanțe personalizate la o stare inițială specifică.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Prin urmare, o clasă poate defini o metodă specială numită&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/datamodel.html#object.__init__&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;opoziție .__ init__&quot;&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;__init __ ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, după cum urmează:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;__init__&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;data&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[]&lt;/span&gt;&lt;/pre&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Atunci când o clasă definește o&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/datamodel.html#object.__init__&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;opoziție .__ init__&quot;&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;metodă __init __ ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, instanța de clasă invocă automat&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/datamodel.html#object.__init__&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;opoziție .__ init__&quot;&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;__init __ ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;pentru instanța de clasă nou creată.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Astfel, în acest exemplu, o nouă instanță inițializată poate fi obținută prin:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;n&quot;&gt;x &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;MyClass &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Desigur, metoda&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/datamodel.html#object.__init__&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;opoziție .__ init__&quot;&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;__init __ ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;poate avea argumente pentru o mai mare flexibilitate.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În acest caz, argumentele date operatorului instanței de clasă sunt transmise&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/datamodel.html#object.__init__&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;opoziție .__ init__&quot;&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;__init __ ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu,&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;pre style=&quot;background-color: #eeffcc; border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;Complex&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;__init__&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;realpart&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;imagpart&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;        &lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;r&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;realpart&lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;        &lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;imagpart&lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;...&lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Complex&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mf&quot; style=&quot;color: #208050;&quot;&gt;3.0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mf&quot; style=&quot;color: #208050;&quot;&gt;4.5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;r&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;(3.0, -4.5)&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;instance-objects&quot;&gt;
&lt;span id=&quot;tut-instanceobjects&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h3 style=&quot;border: 0px; color: #1a1a1a; font-size: 22.4px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;9.3.3.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Obiectele de instanță&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#instance-objects&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acum, ce putem face cu obiectele instanței?&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Singurele operațiuni înțelese de obiectele instanței sunt referințele atributelor.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Există două tipuri de nume de atribute valide, atribute și metode de date.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;em&gt;atributele de date&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;corespund &quot;variabilelor de instanță&quot; din Smalltalk și &quot;membrilor de date&quot; din C ++.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Atribuiile de date nu trebuie să fie declarate;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;cum ar fi variabilele locale, ele apar în momentul în care sunt atribuite pentru prima dată.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu, dacă&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;x&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este instanța&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;xref py py-class docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;MyClass&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;creată mai sus, următoarea bucată de cod va tipări valoarea&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;16&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, fără a lăsa o urmă:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;pre style=&quot;background-color: #eeffcc; border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;counter&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1&lt;/span&gt;
&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;counter&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;counter&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;counter&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2&lt;/span&gt;
&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;counter&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;del&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;counter&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Alt tip de referință a atributului de instanță este o&amp;nbsp;&lt;/span&gt;&lt;em&gt;metodă&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;O metodă este o funcție care &quot;aparține&quot; unui obiect.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;(În Python, metoda termenului nu este unică pentru instanțele de clasă: alte tipuri de obiecte pot avea și metode, de exemplu, obiectele din listă au metode numite adăugați, inserați, ștergeți, sortați și așa mai departe.În următoarea discuție, vom folosi metoda termenului exclusiv pentru a înțelege metode ale obiectelor instanțelor de clasă, cu excepția cazului în care se specifică altfel.)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div id=&quot;index-0&quot; style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Numele de metode valide ale unui obiect de instanță depind de clasa sa.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Prin definiție, toate atributele unei clase care sunt obiecte funcționale definesc metodele corespunzătoare ale instanțelor sale.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Deci, în exemplul nostru,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;xf&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este o referință validă a metodei, deoarece&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;MyClass.f&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este o funcție, dar&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;xi&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;nu este, deoarece&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;MyClass.i&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;nu este.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dar&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;xf&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;nu este același lucru cu&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;MyClass.f&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;- este un&amp;nbsp;&lt;/span&gt;&lt;em&gt;obiect de metodă&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, nu un obiect de funcție.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;method-objects&quot;&gt;
&lt;span id=&quot;tut-methodobjects&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h3 style=&quot;border: 0px; color: #1a1a1a; font-size: 22.4px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;9.3.4.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Metodă Obiecte&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#method-objects&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De obicei, o metodă este chemată imediat după ce este obligată:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;f &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;exemplul&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;xref py py-class docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;MyClass&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, aceasta va returna șirul&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&quot;hello&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;world&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Cu toate acestea, nu este necesar să apelați imediat o metodă:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;xf&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este un obiect de metodă și poate fi stocat și apelat ulterior.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;n&quot;&gt;xf &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;f în &lt;/span&gt;
&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;timp ce &lt;/span&gt; &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;True &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;xf &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;())&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;va continua să tipărească&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;lumea&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;salutului&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;până la sfârșitul timpului.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Ce se întâmplă exact atunci când se numește o metodă?&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Este posibil să fi observat că&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;xf () a&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;fost apelat fără un argument de mai sus, chiar dacă definiția funcției pentru&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;f () a&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;specificat un argument.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Ce sa întâmplat cu argumentul?&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Cu siguranță, Python ridică o excepție atunci când o funcție care necesită un argument este numită fără nici un cuvânt - chiar dacă argumentul nu este utilizat efectiv ...&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De fapt, poate ați ghicit răspunsul: lucrurile speciale despre metode sunt că obiectul este trecut ca primul argument al funcției.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În exemplul nostru, apelul&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;xf ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este exact echivalent cu&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;MyClass.f (x)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În general, apelarea unei metode cu o listă de&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;argumente&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;n&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este echivalentă cu apelarea funcției corespunzătoare cu o listă de argumente care este creată prin introducerea obiectului metodei înaintea primului argument.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă încă nu înțelegeți cum funcționează metodele, o privire la implementarea poate clarifica problemele.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Atunci când un atribut instanță este referit, care nu este un atribut de date, se caută clasa sa.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă numele denumește un atribut de clasă valabil, care este un obiect funcțional, un obiect de metodă este creat prin împachetarea (indicii către) obiectul instanței și obiectul funcției care au fost găsiți împreună într-un obiect abstract: acesta este obiectul metodei.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Atunci când obiectul metodei este numit cu o listă de argumente, se construiește o nouă listă de argumente din obiectul instanță și din lista de argumente, iar obiectul funcțional se numește cu această nouă listă de argumente.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;random-remarks&quot; style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 16px;&quot;&gt;
&lt;span id=&quot;tut-remarks&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h2 style=&quot;border: 0px; color: #1a1a1a; font-size: 25.6px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;9.4.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Alegeri aleatorii&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#random-remarks&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Atributele de date suprascriu atributele metodei cu același nume;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pentru a evita conflictele de nume accidentale, care pot provoca erori greu de găsit în programele mari, este înțelept să folosiți un fel de convenție care să minimizeze șansele de conflicte.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Contractele posibile includ numele de metode de capitalizare, prefixarea numelor de atribute de date cu un șir unic mic (poate doar o subliniere) sau utilizarea verbelor pentru metode și substantive pentru atributele de date.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Atributele de date pot fi menționate prin metode, precum și de către utilizatorii obișnuiți (&quot;clienți&quot;) ai unui obiect.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Cu alte cuvinte, clasele nu sunt utilizabile pentru a pune în aplicare tipuri pure de date abstracte.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De fapt, nimic din Python nu face posibilă ascunderea datelor ascunse - totul se bazează pe convenție.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;(Pe de altă parte, implementarea Python, scrisă în C, poate să ascundă complet detaliile implementării și să controleze accesul la un obiect, dacă este necesar, acesta putând fi folosit de extensiile Python scrise în C.)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Clienții ar trebui să folosească atributele de date cu grijă - clienții pot provoca daune invarianților întreținute de metode prin ștampilarea pe atributele lor de date.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Rețineți că clienții pot adăuga propriile atribute de date unui obiect de instanță fără a afecta valabilitatea metodelor, atâta timp cât sunt evitate conflictele de nume - din nou, o convenție de numire poate salva o mulțime de dureri de cap aici.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Nu există o stenogramă pentru referirea atributelor de date (sau a altor metode!) Din cadrul metodelor.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Consider că acest lucru mărește, de fapt, lizibilitatea metodelor: nu există nicio șansă de a confunda variabilele locale și variabilele de instanță atunci când se uită printr-o metodă.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Adesea, primul argument al unei metode se numește&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sine&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Aceasta nu este altceva decât o convenție: numele de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sine&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;nu are absolut nici un înțeles special pentru Python.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Rețineți însă că, prin nerespectarea convenției, codul dvs. poate fi mai puțin accesibil altor programatori Python și este de asemenea posibil ca un&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;program de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;browser de clasă&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;să poată fi scris care se bazează pe o astfel de convenție.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Orice obiect de funcții care este un atribut de clasă definește o metodă pentru instanțele acelei clase.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Nu este necesar ca definiția funcției să fie inclusă în text în definiția clasei: atribuirea unui obiect funcțional unei variabile locale în clasă este, de asemenea, ok.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;pre style=&quot;background-color: #eeffcc; border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# Function defined outside the class&lt;/span&gt;
&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;f1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;min&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;y&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;C&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;f&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;f1&lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
        &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;hello world&#39;&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;h&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;g&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acum&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;f&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;,&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;h&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;sunt atribute ale clasei&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;xref py py-class docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;C&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;care se referă la obiectele funcției și, prin urmare, toate metode ale instanțelor&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;xref py py-class docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;C&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;-&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;h&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;sunt exact echivalente cu&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Rețineți că această practică servește, de obicei, doar la confuzarea cititorului unui program.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Metodele pot apela alte metode prin utilizarea atributelor metode ale&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;argumentului&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;auto&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;pre style=&quot;background-color: #eeffcc; border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;Bag&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;__init__&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
        &lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;data&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[]&lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;add&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
        &lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;addtwice&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
        &lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;add&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;add&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Metodele pot face referire la nume globale în același mod ca și funcțiile obișnuite.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Domeniul de aplicare global asociat unei metode este modulul care conține definiția sa.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;(O clasă nu este niciodată utilizată ca domeniu de aplicare global). În timp ce unul rareori întâlnește un motiv bun pentru utilizarea datelor globale într-o metodă, există multe utilizări legitime ale domeniului global: pentru un singur lucru, funcțiile și modulele importate în sfera globală pot să fie utilizate prin metode, precum și funcții și clase definite în acesta.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De obicei, clasa care conține metoda este ea însăși definită în acest domeniu global, iar în următoarea secțiune vom găsi câteva motive bune pentru care o metodă ar dori să se refere la propria clasă.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Fiecare valoare este un obiect și, prin urmare, are o&amp;nbsp;&lt;/span&gt;&lt;em&gt;clasă&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;(de asemenea numită&amp;nbsp;&lt;/span&gt;&lt;em&gt;tipul&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;ei&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Este stocat ca&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;obiect .__ class__&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;inheritance&quot; style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 16px;&quot;&gt;
&lt;span id=&quot;tut-inheritance&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h2 style=&quot;border: 0px; color: #1a1a1a; font-size: 25.6px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;9.5.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Moștenire&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#inheritance&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Bineînțeles, o caracteristică lingvistică nu ar fi demnă de denumirea &quot;clasă&quot; fără a susține moștenirea.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Sintaxa pentru o definiție a clasei derivate arată astfel:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;clasă &lt;/span&gt; &lt;span class=&quot;nc&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;DerivedClassName &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;BaseClassName &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
    &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&amp;lt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;declarație &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;- &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&amp;gt; &lt;/span&gt;
    &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;
    &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;
    &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;
    &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&amp;lt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;declarație &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;- &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;N &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Numele&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;xref py py-class docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;BaseClassName&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;trebuie definit într-un domeniu care conține definiția clasei derivate.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În locul unui nume de clasă de bază, sunt permise și alte expresii arbitrare.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest lucru poate fi util, de exemplu, atunci când clasa de bază este definită într-un alt modul:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;Clasa de clasa &lt;/span&gt; &lt;span class=&quot;nc&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;derivat˘a &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;modname &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;BaseClassName &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Executarea unei definiții de clasă derivată este aceeași ca și pentru o clasă de bază.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Atunci când obiectul de clasă este construit, clasa de bază este amintită.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acesta este folosit pentru rezolvarea referințelor atributului: dacă un atribut solicitat nu este găsit în clasă, căutarea continuă să se uite în clasa de bază.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Această regulă este aplicată recursiv dacă clasa de bază în sine este derivată dintr-o altă clasă.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Nu este nimic special în instanțierea claselor derivate:&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;DerivedClassName ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;creează o nouă instanță a clasei.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Referințele la metodă sunt rezolvate după cum urmează: se caută atributul de clasă corespunzător, coborând în jos lanțul de clase de bază, dacă este necesar, iar referința metodei este validă dacă aceasta dă un obiect de funcție.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Clasele derivate pot depasi metodele din clasele de baza ale acestora.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Deoarece metodele nu au privilegii speciale atunci când apelați alte metode ale aceluiași obiect, o metodă a unei clase de bază care apelează o altă metodă definită în aceeași clasă de bază poate ajunge la a apela o metodă a unei clase derivate care o suprascrie.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;(Pentru programatori C ++: toate metodele din Python sunt efectiv&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;virtuale&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;O metodă suprapusă într-o clasă derivată poate, de fapt, să dorească să se extindă mai degrabă decât să înlocuiască pur și simplu metoda de clasă de bază cu același nume.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Există o modalitate simplă de a apela metoda directă a clasei de bază: trebuie doar să apelați&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;BaseClassName.methodname (auto,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;argumente)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest lucru este uneori util și pentru clienți.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;(Rețineți că acest lucru funcționează numai dacă clasa de bază este accesibilă ca&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;BaseClassName&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;în domeniul global.)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Python are două funcții încorporate care funcționează cu moștenire:&lt;/span&gt;&lt;/div&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Utilizați&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#isinstance&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;isinstance&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;instanța ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;pentru a verifica tipul instanței:&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;isinstance (obj,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;int)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;va fi&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Adevărat&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;numai dacă&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;obj .__ class__&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#int&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;int&quot;&gt;&lt;tt class=&quot;xref py py-class docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;int&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;sau o anumită clasă derivată din&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#int&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;int&quot;&gt;&lt;tt class=&quot;xref py py-class docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;int&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Utilizați&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#issubclass&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;issubclass&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;issubclass ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;pentru a verifica moștenirea claselor:&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;issubclass (bool,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;int)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;True&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;deoarece&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#bool&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;bool&quot;&gt;&lt;tt class=&quot;xref py py-class docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;bool&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este o subclasă de&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#int&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;int&quot;&gt;&lt;tt class=&quot;xref py py-class docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;int&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Cu toate acestea,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;issubclass (float,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;int)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;este&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;False,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;deoarece&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#float&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;pluti&quot;&gt;&lt;tt class=&quot;xref py py-class docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;float&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;nu este o subclasă de&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#int&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;int&quot;&gt;&lt;tt class=&quot;xref py py-class docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;int&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;section&quot; id=&quot;multiple-inheritance&quot;&gt;
&lt;span id=&quot;tut-multiple&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h3 style=&quot;border: 0px; color: #1a1a1a; font-size: 22.4px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;9.5.1.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Moștenire multiplă&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#multiple-inheritance&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Python susține și o formă de moștenire multiplă.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;O definiție de clasă cu mai multe clase de bază arată astfel:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;clasa &lt;/span&gt; &lt;span class=&quot;nc&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;DerivedClassName &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Base1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Base2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Base3 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
    &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&amp;lt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;declarație &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;- &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&amp;gt; &lt;/span&gt;
    &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;
    &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;
    &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;
    &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&amp;lt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;declarație &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;- &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;N &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În cele mai multe scopuri, în cele mai simple cazuri, vă puteți gândi la căutarea atributelor moștenite de la o clasă părinte ca adâncime în primul rând, de la stânga la dreapta, fără a căuta de două ori în aceeași clasă în care există o suprapunere în ierarhie.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Astfel, dacă un atribut nu este găsit în&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;xref py py-class docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;DerivedClassName&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, acesta este căutat în&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;xref py py-class docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Base1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, apoi (recursiv) în clasele de bază ale&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;xref py py-class docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Base1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și, dacă nu a fost găsit acolo, a fost căutat în&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;xref py py-class docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Base2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și așa mai departe.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De fapt, este puțin mai complexă decât asta;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;ordinea de rezoluție a metodei se modifică dinamic pentru a sprijini apelurile de tip cooperativ către&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#super&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;super&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;super ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Această abordare este cunoscută în alte limbi cu mai multe moșteniri ca metodă call-next și este mai puternică decât super-apelul găsit în limbi de mostenire singulară.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Comanda dinamică este necesară deoarece toate cazurile de moștenire multiplă prezintă una sau mai multe relații diamante (unde cel puțin una dintre clasele părinte poate fi accesată prin mai multe căi din clasa de jos).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu, toate clasele moștenesc de la&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#object&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;obiect&quot;&gt;&lt;tt class=&quot;xref py py-class docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;obiect&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, astfel încât orice caz de moștenire multiplă oferă mai mult de o cale pentru a ajunge la&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#object&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;obiect&quot;&gt;&lt;tt class=&quot;xref py py-class docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;obiect&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pentru a păstra clasele de bază accesate de mai multe ori, algoritmul dinamic linearizează ordinea de căutare într-un mod care păstrează ordonarea de la stânga la dreapta specificată în fiecare clasă, care apelează fiecare părinte o singură dată și care este monotonică o clasă poate fi subclasată fără a afecta ordinea de prioritate a părinților săi).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Luate împreună, aceste proprietăți fac posibilă proiectarea unor clase fiabile și extensibile cu moștenire multiplă.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pentru mai multe detalii, consultați&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference external&quot; href=&quot;http://www.python.org/download/releases/2.3/mro/&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;http://www.python.org/download/releases/2.3/mro/&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;private-variables&quot; style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 16px;&quot;&gt;
&lt;span id=&quot;tut-private&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h2 style=&quot;border: 0px; color: #1a1a1a; font-size: 25.6px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;9.6.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Variabile private&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#private-variables&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Variabilele de instanță &quot;private&quot; care nu pot fi accesate decât în ​​interiorul unui obiect nu există în Python.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Cu toate acestea, există o convenție care este urmată de majoritatea codului Python: un nume prefixat cu o subliniere (de exemplu,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;_spam&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;) trebuie tratat ca o parte non-publică a API-ului (indiferent dacă este o funcție, o metodă sau un membru de date) .&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Ar trebui să fie considerat un detaliu al implementării și să se schimbe fără notificare.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Deoarece există un caz de utilizare valabil pentru membrii de clasă privat (și anume pentru a evita ciocnirile de nume cu nume definite de subclase), există un sprijin limitat pentru un astfel de mecanism, denumit&amp;nbsp;&lt;/span&gt;&lt;em class=&quot;dfn&quot;&gt;mangling nume&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Orice identificator al formularului&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;__spam&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;(cel puțin două subliniere de frunte, cel mult un subliniere&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;finală&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;) este înlocuit textual cu&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;_classname__spam&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, unde&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;classname&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este numele curent al clasei cu underscorele principale&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;dezbatete&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest mangling se face fără să se țină cont de poziția sintactică a identificatorului, atâta timp cât apare în definiția unei clase.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Numele mangling este util pentru a permite subclasele să înlocuiască metodele fără a rupe apelurile prin metoda intraclass.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;Clasa de &lt;/span&gt; &lt;span class=&quot;nc&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;cartografiere &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;def &lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;__init__ &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;auto &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;iterable &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): de &lt;/span&gt;
        &lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;sine &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;items_list &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[] &lt;/span&gt;
        &lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;singur &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;__update &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;iterabil &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;def &lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;update &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;auto &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;iterabil &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
        &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;element &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;iterabil &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
            &lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;auto &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;items_list &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;adăugați &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;element &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

    &lt;span class=&quot;n&quot;&gt;__update &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;actualizare &lt;/span&gt;   &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# copie privată a metodei original update ()&lt;/span&gt;

&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;class &lt;/span&gt; &lt;span class=&quot;nc&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;MappingSubclass &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Mapping &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;

    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;def &lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;actualizare &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;auto &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;chei &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;valori &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
        &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# furnizează o nouă semnătură pentru actualizare () &lt;/span&gt;
        &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# dar nu rupe __init __ () &lt;/span&gt;
        &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;elementul &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;zip &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;chei &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;valori &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
            &lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;auto &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;items_list &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;adăugați &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;element &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Rețineți că regulile de mangling sunt concepute în principal pentru a evita accidentele;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;este încă posibil să accesați sau să modificați o variabilă considerată privată.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest lucru poate fi util chiar și în circumstanțe speciale, cum ar fi în programul de depanare.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Observați că codul trecut la&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;exec ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;sau&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;eval ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;nu consideră că clasa clasei invocate este clasa curentă;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;acest lucru este similar cu efectul&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;instrucțiunii&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;globale&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, efectul căruia este limitat la codul care este compilat împreună.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Aceeași restricție se aplică și pentru&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;getattr ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;,&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;setattr ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;delattr ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, precum și atunci când se face referire&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;directă&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;__dict__&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;odds-and-ends&quot; style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 16px;&quot;&gt;
&lt;span id=&quot;tut-odds&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h2 style=&quot;border: 0px; color: #1a1a1a; font-size: 25.6px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;9.7.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Cote și sfârșituri&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#odds-and-ends&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Uneori este util să aveți un tip de date similar cu &quot;înregistrarea&quot; Pascal sau C &quot;struct&quot;, grupând împreună câteva elemente de date numite.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;O definiție a clasei goale va face bine:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;clasa &lt;/span&gt; &lt;span class=&quot;nc&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;angajat &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;treci&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;john &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Angajat &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;() &lt;/span&gt; &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# Creați o înregistrare a angajatului gol&lt;/span&gt;

&lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# Completați câmpurile &lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;john-ului de &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;înregistrare &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;nume &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;John Doe&#39; &lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;john &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dept &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;computer lab&#39; &lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;john &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;salariu &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1000&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;O bucată de cod Python care așteaptă un anumit tip de date abstract poate fi adesea trecută de o clasă care emulează în schimb metodele acelui tip de date.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu, dacă aveți o funcție care formatează anumite date dintr-un obiect de fișier, puteți defini o clasă cu metode&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;read ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;readline ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;care obțin datele dintr-un tampon șir și o transmit ca un argument.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Metoda instanței are și atribute:&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;m .__ self__&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este obiectul instanței cu metoda&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;m ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, iar&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;m .__ func__&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este obiectul funcției corespunzător metodei.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;exceptions-are-classes-too&quot; style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 16px;&quot;&gt;
&lt;span id=&quot;tut-exceptionclasses&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h2 style=&quot;border: 0px; color: #1a1a1a; font-size: 25.6px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;9.8.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Excepțiile sunt prea&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#exceptions-are-classes-too&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Excepțiile definite de utilizator sunt identificate și pe clase.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Folosind acest mecanism este posibil să se creeze ierarhii extensibile de excepții.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Există două noi forme valide (semantice) pentru&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;instrucțiunea de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/simple_stmts.html#raise&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;creare&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;ridica &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;clasa&lt;/span&gt;

&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;ridicați &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;instanța&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În prima formă,&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Clasa&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;trebuie să fie o instanță de&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#type&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;tip&quot;&gt;&lt;tt class=&quot;xref py py-class docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;tip&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;sau de o clasă derivată din ea.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Prima formă este o stenogramă pentru:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;ridica &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Clasa &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;O clasă în&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#except&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;afară&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;de clauză este compatibilă cu o excepție în&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;cazul în&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;care este aceeași clasă sau o clasă de&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;bază ale acestora (dar nu și&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;invers - o clauză cu&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;excepția listarea o clasă derivată nu este compatibilă cu o clasă de&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;bază).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu, următorul cod va imprima B, C, D în ordinea următoare:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;clasa &lt;/span&gt; &lt;span class=&quot;nc&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;B &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;ne&quot; style=&quot;color: #007020;&quot;&gt;excepție &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;treceți &lt;/span&gt;
&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;clasa &lt;/span&gt; &lt;span class=&quot;nc&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;C &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;B &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;treceți &lt;/span&gt;
&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;clasa &lt;/span&gt; &lt;span class=&quot;nc&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;D &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;C &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;treceți&lt;/span&gt;

&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cls &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;B &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;C &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;D &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]: &lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;incercati &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
        &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;ridica &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cls &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;() cu &lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;excepția &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;D &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
        &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;D&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) , cu &lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;excepția &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;C &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
        &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;C&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) cu &lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;excepția &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;B &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
        &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;B&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Rețineți că dacă clauzele excepționale au fost inversate (cu&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;excepția lui&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;B în&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;prealabil), ar fi imprimat B, B, B - prima potrivire cu excepția clauzei este declanșată.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Atunci când se imprimă un mesaj de eroare pentru o excepție nefolosită, este imprimat numele clasei excepției, apoi un colon și un spațiu și, în final, instanța a fost convertită la un șir folosind funcția built-in&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/stdtypes.html#str&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;str&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;str ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;iterators&quot; style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 16px;&quot;&gt;
&lt;span id=&quot;tut-iterators&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h2 style=&quot;border: 0px; color: #1a1a1a; font-size: 25.6px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;9.9.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Iteratori&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#iterators&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Până acum ați observat probabil că majoritatea obiectelor container pot fi bucle cu ajutorul unei&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;instrucțiuni&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#for&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pentru&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;elementul &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;din &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;3 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]: &lt;/span&gt;
    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;elementul &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;elementul &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;din &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;3 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;elementul &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cheie &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{ &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;one&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;doi&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}: &lt;/span&gt;
    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cheie &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;char &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;123&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;char &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;linie&lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;deschis &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;myfile.txt&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;linie &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest stil de acces este clar, concis și convenabil.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Utilizarea iteratoarelor pătrunde și unifică Python.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În spatele scenei,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;instrucțiunea&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#for&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;for&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;solicită&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#iter&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;iter&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;iter ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;pe obiectul containerului.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Funcția returnează un obiect iterator care definește metoda&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/stdtypes.html#iterator.__next__&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;iterator .__ next__&quot;&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;__next __ ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;care accesează elementele din container unul câte unul.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Atunci când nu mai există elemente,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/stdtypes.html#iterator.__next__&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;iterator .__ next__&quot;&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;__next __ ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;ridică o&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;excepție&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/exceptions.html#StopIteration&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;StopIteration&quot;&gt;&lt;tt class=&quot;xref py py-exc docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;StopIteration,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;care indică faptul că&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;buclă&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#for&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;for&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;va termina.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Puteți apela metoda&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/stdtypes.html#iterator.__next__&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;iterator .__ next__&quot;&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;__next __ ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;folosind&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#next&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;Următor →&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;următoarea () funcție&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;încorporată;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;acest exemplu arată cum funcționează toate:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;in ? &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;următorul &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;( &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;it &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;) &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;gr&quot; style=&quot;color: red;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;StopIteration&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;gt&quot; style=&quot;color: #0044dd;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;m&quot; style=&quot;color: #208050;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;gr&quot; style=&quot;color: red;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;După ce am văzut mecanica din spatele protocolului iterator, este ușor să adăugați comportamentul iterator la clasele tale.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Definiți o&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/datamodel.html#object.__iter__&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;opoziție .__ iter__&quot;&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;metodă __iter __ ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;care returnează un obiect cu o&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/stdtypes.html#iterator.__next__&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;iterator .__ next__&quot;&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;metodă __next __ ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă clasa definește&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;__next __ ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, atunci&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/datamodel.html#object.__iter__&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;opoziție .__ iter__&quot;&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;__iter __ () se&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;poate întoarce&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;singură&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;clasa &lt;/span&gt; &lt;span class=&quot;nc&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;inversă &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
    &lt;span class=&quot;sd&quot; style=&quot;color: #4070a0; font-style: italic;&quot;&gt;&quot;&quot; &quot;Iterator pentru reluarea unei secvențe înapoi.&quot; &quot; &lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;def &lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;__init__ &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;sine &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;date &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
        &lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;sine &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;date &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;date de &lt;/span&gt;
        &lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;sine &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;index &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;len &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;date &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;def &lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;__iter__ &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;auto &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
        &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;întoarcere &lt;/span&gt; &lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;self &lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;def &lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;__next__ &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;auto &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
        &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;dacă &lt;/span&gt; &lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;ești &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;singur &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;index &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;== &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;0 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
            &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;ridicați &lt;/span&gt; &lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;Auto &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;ne&quot; style=&quot;color: #007020;&quot;&gt;StopIteration &lt;/span&gt;
        &lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;index &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;=&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;de sine &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;index &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;- &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;
        &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;întoarcerea de &lt;/span&gt; &lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;sine &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;date &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;auto &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;index &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;rev &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Reverse &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;spam &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;iter &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;rev &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&amp;lt;__ principal __ Obiect invers la 0x00A1DB50&amp;gt; &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;char &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;in &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;rev &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;char &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;m &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;a &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;p &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;s&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;generators&quot; style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 16px;&quot;&gt;
&lt;span id=&quot;tut-generators&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h2 style=&quot;border: 0px; color: #1a1a1a; font-size: 25.6px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;9.10.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Generatoare&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#generators&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/glossary.html#term-generator&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em class=&quot;xref std std-term&quot;&gt;Generatoarele&lt;/em&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;sunt un instrument simplu și puternic pentru crearea iteratorilor.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Ele sunt scrise ca funcții obișnuite, dar utilizează&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;instrucțiunea de&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/simple_stmts.html#yield&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;randament&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;ori de câte ori doresc să returneze date.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De fiecare dată când&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;se cheamă&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#next&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;Următor →&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;următorul ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, generatorul revine la locul unde a rămas (își amintește toate valorile datelor și care a fost executată ultima dată).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Un exemplu arată că generatoarele pot fi ușor de creat:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;Definiție &lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;inversă &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;date &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;indexul &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;din &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;intervalul &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;len &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;date &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;- &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;- &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;- &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
        &lt;span style=&quot;vertical-align: inherit;&quot;&gt;date privind &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;randamentul &lt;/span&gt; &lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;[ &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;index &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;char &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;in &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;reverse &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;golf&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;char &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;f &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;l &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;o &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;g&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Orice lucru care se poate face cu generatoarele se poate face, de asemenea, cu iteratori de clasă, așa cum este descris în secțiunea anterioară.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Ceea ce face generatoarele atât de compacte este că&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/datamodel.html#object.__iter__&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;opoziție .__ iter__&quot;&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;metodele __iter __ ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/expressions.html#generator.__next__&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;Generator .__ next__&quot;&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;__next __ ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;sunt create automat.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;O altă caracteristică cheie este aceea că variabilele locale și starea de execuție sunt salvate automat între apeluri.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest lucru a făcut ca funcția să fie mai ușor de scris și mult mai clară decât o abordare utilizând variabile de exemplu, cum ar fi&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;self.index&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;auto.data&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În plus față de crearea automată a metodei și de salvarea stării programului, atunci când generatoarele termină, ele cresc automat&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/exceptions.html#StopIteration&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;StopIteration&quot;&gt;&lt;tt class=&quot;xref py py-exc docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;StopIteration&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În combinație, aceste caracteristici ușurează crearea iteratorilor fără efort mai mult decât scrierea unei funcții obișnuite.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;generator-expressions&quot; style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 16px;&quot;&gt;
&lt;span id=&quot;tut-genexps&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h2 style=&quot;border: 0px; color: #1a1a1a; font-size: 25.6px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;9.11.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Expresii generatoare&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#generator-expressions&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Unele generatoare simple pot fi codificate succint ca expresii utilizând o sintaxă similară înțelegerii listei, dar cu paranteze în loc de paranteze.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Aceste expresii sunt concepute pentru situațiile în care generatorul este utilizat imediat printr-o funcție de închidere.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Expresiile generatoare sunt mai compacte, dar mai puțin versatile decât definițiile complete ale generatoarelor și tind să fie mai prietenoase față de memorie decât comprehensiunea echivalentă a listelor.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Exemple:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;suma &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;* &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i &lt;/span&gt; &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;i &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;intervalul &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;10 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)) &lt;/span&gt;                 &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# suma pătratelor &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;285&lt;/span&gt;

&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;xvec &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;10 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;20 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;30 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;yvec &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;7 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;5 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;3 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;sum &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;* &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;y &lt;/span&gt; &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;y &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;zip &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;xvec &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;yvec &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)) &lt;/span&gt;         &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;produs # dot &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;260&lt;/span&gt;

&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; de &lt;/span&gt;&lt;span class=&quot;kn&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;la &lt;/span&gt; &lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;importul de &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;nn&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;matematică &lt;/span&gt; &lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pi &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;, &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sin &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sine_table &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;= &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;{ &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;x &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;: &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sin &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;( &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;x &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;* &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pi &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;/ &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;180 &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;) &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pentru &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;x &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;în &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;intervalul &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;( &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;0 &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;, &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;91 &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;)}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;

&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;unique_words &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;set &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cuvânt &lt;/span&gt;  &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;linie &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pagină &lt;/span&gt;  &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cuvânt &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;rândul &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;split &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;())&lt;/span&gt;

&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;valedictorian &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;max &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;elev &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;APG &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;elev &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Nume &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt; &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;student de &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;la &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;absolvenți &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;data &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;golf &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;lista &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;date &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt; &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;i &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;intervalul &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;len &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;data &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;- &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;- &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;- &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;[&#39; f &#39;,&#39; g &#39;]&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;rubric&quot; style=&quot;font-weight: bold; line-height: 22.4px; margin-top: 30px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Note de subsol&lt;/span&gt;&lt;/div&gt;
&lt;table class=&quot;docutils footnote&quot; frame=&quot;void&quot; id=&quot;id2&quot; rules=&quot;none&quot; style=&quot;border-collapse: collapse; border-radius: 3px; border: 0px; margin-bottom: 10px; margin-top: 10px; min-width: 20%;&quot;&gt;&lt;colgroup&gt;&lt;col class=&quot;label&quot;&gt;&lt;/col&gt;&lt;col&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;tbody valign=&quot;top&quot;&gt;
&lt;tr&gt;&lt;td class=&quot;label&quot; style=&quot;border-radius: 3px; border: 0px; padding: 0.3em 0.5em;&quot;&gt;&lt;a class=&quot;fn-backref&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#id1&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;[1]&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;border-radius: 3px; border: 0px; padding: 0.3em 0.5em;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Cu excepția unui singur lucru.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Obiectele modulului au un atribut secret read-only numit&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;xref py py-attr docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;__dict__&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;care returnează dicționarul utilizat pentru a implementa spațiul de nume al modulului;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;numele&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;xref py py-attr docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;__dict__&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este un atribut, dar nu un nume global.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Evident, folosirea acestei metode încalcă abstractizarea implementării spațiului de nume și ar trebui să se limiteze la lucruri ca debuggerii post-mortem.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Sursa :&amp;nbsp;&lt;a href=&quot;https://docs.python.org/3.3/tutorial/classes.html&quot;&gt;https://docs.python.org/3.3/tutorial/classes.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://infotestpc.blogspot.com/feeds/1457602723507051215/comments/default' title='Postare comentarii'/><link rel='replies' type='text/html' href='http://infotestpc.blogspot.com/2018/01/python-un-limbaj-accesibil.html#comment-form' title='0 comentarii'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5038728009841547747/posts/default/1457602723507051215'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5038728009841547747/posts/default/1457602723507051215'/><link rel='alternate' type='text/html' href='http://infotestpc.blogspot.com/2018/01/python-un-limbaj-accesibil.html' title=' Python un limbaj accesibil'/><author><name>Al Con</name><uri>http://www.blogger.com/profile/17409243868650327707</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjETIXWN_Yf2_UWW2QvpsQjOs6Oib0gzTbPdBl7ehwU0sbP1ToBV0k56zH_7YZ5Y1PxznXsmD5UrfOw0NU6iNvarm3HV8fOLXz-lcqU5h5BHQ69GcomTj9fcxjSHOCICNmnjhD7KBbjVQ/s72-c/images.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5038728009841547747.post-5670349562212501708</id><published>2018-01-18T14:59:00.001-08:00</published><updated>2020-12-16T12:07:13.339-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="BAZE DE DATE"/><category scheme="http://www.blogger.com/atom/ns#" term="Conexiune"/><category scheme="http://www.blogger.com/atom/ns#" term="Initiere"/><category scheme="http://www.blogger.com/atom/ns#" term="Module"/><category scheme="http://www.blogger.com/atom/ns#" term="programare"/><category scheme="http://www.blogger.com/atom/ns#" term="Promo"/><category scheme="http://www.blogger.com/atom/ns#" term="Sursa"/><category scheme="http://www.blogger.com/atom/ns#" term="USB"/><title type='text'>USB Tool</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h1 style=&quot;background: rgb(255, 255, 255); color: #333333; font-family: &amp;quot;Trebuchet MS&amp;quot;, &amp;quot;Lucida Grande&amp;quot;, Verdana, Arial, sans-serif; margin: 10px 0px 5px;&quot;&gt;
&lt;span style=&quot;font-size: large; vertical-align: inherit;&quot;&gt;&lt;a href=&quot;https://www.pendrivelinux.com/install-dban-to-a-usb-flash-drive-using-windows/&quot;&gt;Instalați DBAN pe o unitate flash USB utilizând Windows&lt;/a&gt;&lt;/span&gt;&lt;/h1&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAiR50Sp45q0R1tEpX6BCNhC4TYoFQvHjFZxuLO1DKuoubzH8nqs_l-x5vwaDxE4BN-j8gXaU3Y2mDCkl1zUslIwiLZ4Nqe7vpPNZwoFwJoFWLjOHb1Raw_Lox1xoJBD81dhU6oa3GrQ/s1600/stick-bootabil-windows-7.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;297&quot; data-original-width=&quot;434&quot; height=&quot;218&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAiR50Sp45q0R1tEpX6BCNhC4TYoFQvHjFZxuLO1DKuoubzH8nqs_l-x5vwaDxE4BN-j8gXaU3Y2mDCkl1zUslIwiLZ4Nqe7vpPNZwoFwJoFWLjOHb1Raw_Lox1xoJBD81dhU6oa3GrQ/s320/stick-bootabil-windows-7.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;em style=&quot;background-color: white; color: #333333; font-family: &amp;quot;Lucida Grande&amp;quot;, Verdana, Arial, sans-serif; font-size: 12px;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Rulați DBAN dintr-o unitate flash&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;span face=&quot;&amp;quot;lucida grande&amp;quot; , &amp;quot;verdana&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif&quot; style=&quot;background-color: white; color: #333333; font-size: 12px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;: În următorul tutorial, vă prezentăm modul în care am creat o unitate flash USB de tip DBAN din Windows utilizând programul de instalare USB universal al terților.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em style=&quot;background-color: white; color: #333333; font-family: &amp;quot;Lucida Grande&amp;quot;, Verdana, Arial, sans-serif; font-size: 12px;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Darik&#39;s Boot and Nuke&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;span face=&quot;&amp;quot;lucida grande&amp;quot; , &amp;quot;verdana&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif&quot; style=&quot;background-color: white; color: #333333; font-size: 12px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;(DBAN) este un instrument simplu de boot de distrugere a datelor creat de Darik Horn.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Poate fi utilizată pentru a șterge în siguranță un întreg hard disk sau un disc extern atașat (IDE sau SCSI), complet ștergând tot conținutul discului.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;După finalizare, ar trebui să puteți rula DBAN de pe dispozitivul USB.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span face=&quot;&amp;quot;lucida grande&amp;quot; , &amp;quot;verdana&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif&quot; style=&quot;background-color: white; color: #333333; font-size: 12px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;img alt=&quot;DBAN de la USB&quot; src=&quot;https://www.pendrivelinux.com/wp-content/uploads/DBAN-On-USB.png&quot; /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;ol style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 16px; margin-bottom: 0px; margin-top: 0px; text-align: justify;&quot;&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: #050505; font-family: Arial; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;https://mateisoscel.blogspot.com/2020/12/ce-sa-mai-citim.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 18pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Ce să mai citim?&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;a href=&quot;https://mateisoscel.blogspot.com/2020/12/ce-sa-mai-citim.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Ce să mai citim?&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;a href=&quot;https://anunturigratuitenet.blogspot.com/2012/09/specialisti-in-domeniul-it.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Tatăl fondator al Uniunii Europene.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;a href=&quot;https://alecscon.blogspot.com/2013/01/colonizarea-de-pe-marte.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Colonizarea de pe Marte !&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #050505; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;https://alecscon.blogspot.com/2012/08/robot-pe-marte.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Ne pregătim pentru Marte&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;a href=&quot;https://alecscon.blogspot.com/2012/08/robot-pe-marte.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Colonizarea Marte poate determina umanitatea să-și modifice ADN-ul ?&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: #050505; font-family: Arial; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;a href=&quot;https://blogulucovid.blogspot.com/2020/12/cine-mai-uraste-sa-poarte-o-masca.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;Cine mai urăște să poarte mască?&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;
&lt;h1 class=&quot;entry-title&quot; style=&quot;background-color: white; box-sizing: border-box; font-weight: 400; line-height: 37px; margin: 0px 0px 8px; overflow-wrap: break-word; padding-bottom: 8px; position: relative; text-align: center; word-wrap: break-word;&quot;&gt;
&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot; style=&quot;box-sizing: border-box; font-size: large; vertical-align: inherit;&quot;&gt;&lt;a href=&quot;https://www.nextofwindows.com/how-to-boot-dban-off-usb-drive-to-wipe-out-the-hard-drive&quot;&gt;Cum se pornește unitatea USB DBAN Off pentru a șterge unitatea hard disk&lt;/a&gt;&lt;/span&gt;&lt;/h1&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #222222; font-family: &amp;quot;Source Sans Pro&amp;quot;, sans-serif; font-size: 16px; line-height: 26px; margin-bottom: 24px; overflow-wrap: break-word; text-align: start; word-wrap: break-word;&quot;&gt;
&lt;a href=&quot;https://www.nextofwindows.com/secure-way-to-erase-your-windows-7-hard-drive/&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: #4fa1e8; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;DBAN&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;este un instrument foarte eficient de ștergere a datelor, care elimină complet datele pe hard disk pe care urmează să le eliminați.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Este&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a href=&quot;http://www.dban.org/download&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: #4fa1e8; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;un disc de boot autonom&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;care încarcă computerul și șterge datele pe care le găsește pe hard disk.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Funcționează minunat, așa cum promite, pe orice computer care echipează dispozitivele CD / DVD Rom.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #222222; font-family: &amp;quot;Source Sans Pro&amp;quot;, sans-serif; font-size: 16px; line-height: 26px; margin-bottom: 24px; overflow-wrap: break-word; text-align: start; word-wrap: break-word;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Dar cum ar fi acele computere care nu au un Rom / CD sau au unul care refuză să mai lucreze?&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Iată pașii în care puteți pune DBAN pe o unitate USB de boot.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Vă mulțumim pentru&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a href=&quot;http://www.pendrivelinux.com/install-dban-to-a-usb-flash-drive-using-windows/&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: #4fa1e8; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;pendrivelinux.com pentru partajare&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #222222; font-family: &amp;quot;Source Sans Pro&amp;quot;, sans-serif; font-size: 16px; line-height: 26px; margin-bottom: 24px; overflow-wrap: break-word; text-align: start; word-wrap: break-word;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;1.&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://www.dban.org/download&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: #4fa1e8; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;Descărcați&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;ultimul DBAN.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #222222; font-family: &amp;quot;Source Sans Pro&amp;quot;, sans-serif; font-size: 16px; line-height: 26px; margin-bottom: 24px; overflow-wrap: break-word; text-align: start; word-wrap: break-word;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;2.&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://www.pendrivelinux.com/downloads/Universal-USB-Installer/Universal-USB-Installer-1.8.6.2.exe&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: #4fa1e8; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;Descărcați&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;(link direct de descărcare) Universal USB Installer și lansați-l.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #222222; font-family: &amp;quot;Source Sans Pro&amp;quot;, sans-serif; font-size: 16px; line-height: 26px; margin-bottom: 24px; overflow-wrap: break-word; text-align: start; word-wrap: break-word;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;3. Selectați DBAN 2.2.6 din lista derulantă și alegeți litera unității pentru unitatea USB.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;h3 style=&quot;box-sizing: border-box; color: #101010; font-family: &amp;quot;Graphik Web&amp;quot;, HelveticaNeueBold, HelveticaNeue-Bold, &amp;quot;Helvetica Neue Bold&amp;quot;, HelveticaBold, Helvetica-Bold, &amp;quot;Helvetica Bold&amp;quot;, HelveticaNeue, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 1.125rem; line-height: 1.375rem; margin: 2rem 0px 0px; overflow-wrap: break-word; padding: 0px; word-wrap: break-word;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Nu fii înșelat de anunțurile &quot;Descărcați&quot;&lt;/span&gt;&lt;/h3&gt;
&lt;h3 style=&quot;box-sizing: border-box; color: #101010; font-family: &amp;quot;Graphik Web&amp;quot;, HelveticaNeueBold, HelveticaNeue-Bold, &amp;quot;Helvetica Neue Bold&amp;quot;, HelveticaBold, Helvetica-Bold, &amp;quot;Helvetica Bold&amp;quot;, HelveticaNeue, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 1.125rem; line-height: 1.375rem; margin: 2rem 0px 0px; overflow-wrap: break-word; padding: 0px; word-wrap: break-word;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; font-size: 16px; font-weight: 400; margin-bottom: 0.625rem; margin-top: 0.625rem; padding: 0px;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Unele dintre cele mai reușite anunțuri sunt acelea care îi smulgă pe cititorul unei pagini să creadă că anunțul nu este într-adevăr un anunț, ci ceva util pe acel site.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; font-size: 16px; font-weight: 400; margin-bottom: 0.625rem; margin-top: 0.625rem; padding: 0px;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Aceste tipuri de anunțuri rulează&amp;nbsp;&lt;/span&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;frecvent&lt;/em&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;pe paginile de descărcare de software, care apar ca butoane DOWNLOAD gigant.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;În măsura în care aceste butoane mari ar putea să pară a fi ceea ce trebuie să faceți pentru a descărca software-ul pe care îl urmați, credeți-mă, nu sunt.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; font-size: 16px; font-weight: 400; margin-bottom: 0.625rem; margin-top: 0.625rem; padding: 0px;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Mai rău, aceste anunțuri DOWNLOAD nu merg către site-uri benigne - de obicei, aceștia merg la o pagină malware-răsfățată, unde într-adevăr poți descărca ceva, nu doar&amp;nbsp;&lt;/span&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;ceva ce&lt;/em&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;ai crezut că primești.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; font-size: 16px; font-weight: 400; margin-bottom: 0.625rem; margin-top: 0.625rem; padding: 0px;&quot;&gt;
&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Butoanele de descărcare&amp;nbsp;&lt;/span&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;reală&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;tind să fie mai mici și situate mai aproape de numele fișierului descărcat,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a data-component=&quot;link&quot; data-ordinal=&quot;14&quot; data-source=&quot;inlineLink&quot; data-type=&quot;internalLink&quot; href=&quot;https://www.lifewire.com/version-number-2626043&quot; style=&quot;box-shadow: rgb(0, 93, 127) 0px -2px 0px inset; box-sizing: border-box; color: #005d7f; outline: 0px; padding-bottom: 1px; text-decoration-line: none; transition: all 0.15s ease-in-out 0s;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;numărul versiunii&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;și ultima dată actualizată.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Nu toate paginile de descărcare de software au butoane de descărcare, fie - multe sunt doar linkuri.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; font-size: 16px; font-weight: 400; margin-bottom: 0.625rem; margin-top: 0.625rem; padding: 0px;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;O altă problemă &quot;ce să faceți clic&quot; este un pic mai greu de rezolvat, dar merită încercați:&lt;/span&gt;&lt;/div&gt;
&lt;/h3&gt;
&lt;h3 style=&quot;box-sizing: border-box; color: #101010; font-family: &amp;quot;Graphik Web&amp;quot;, HelveticaNeueBold, HelveticaNeue-Bold, &amp;quot;Helvetica Neue Bold&amp;quot;, HelveticaBold, Helvetica-Bold, &amp;quot;Helvetica Bold&amp;quot;, HelveticaNeue, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 1.125rem; line-height: 1.375rem; margin: 2rem 0px 0px; overflow-wrap: break-word; padding: 0px; word-wrap: break-word;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Evitați &quot;Instalatori&quot; și &quot;Descărcați manageri&quot;&lt;/span&gt;&lt;/h3&gt;
&lt;h3 style=&quot;box-sizing: border-box; color: #101010; font-family: &amp;quot;Graphik Web&amp;quot;, HelveticaNeueBold, HelveticaNeue-Bold, &amp;quot;Helvetica Neue Bold&amp;quot;, HelveticaBold, Helvetica-Bold, &amp;quot;Helvetica Bold&amp;quot;, HelveticaNeue, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 1.125rem; line-height: 1.375rem; margin: 2rem 0px 0px; overflow-wrap: break-word; padding: 0px; word-wrap: break-word;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; font-size: 16px; font-weight: 400; margin-bottom: 0.625rem; margin-top: 0.625rem; padding: 0px;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Site-urile de descărcare de software full-time, cum ar fi&amp;nbsp;&lt;/span&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;skimlinks-unlinked&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Download.cnet.com&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;și&amp;nbsp;&lt;/span&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Softpedia&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;, de obicei găzduiesc programele producătorilor de software gratuit.&lt;/span&gt;&lt;/span&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;skimlinks-unlinked&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; font-size: 16px; font-weight: 400; margin-bottom: 0.625rem; margin-top: 0.625rem; padding: 0px;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;O modalitate prin care aceste site-uri de descărcare&amp;nbsp;&lt;/span&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;își&lt;/em&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;fac&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;banii este prin difuzarea de anunțuri pe site-urile lor.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Un alt mod din ce în ce mai obișnuit de a face bani este prin împachetarea descărcărilor pe care le servesc în interiorul unui program numit&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;instalator&lt;/em&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;sau, mai puțin frecvent, în cadrul unui&amp;nbsp;&lt;/span&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;manager de descărcare&lt;/em&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; font-size: 16px; font-weight: 400; margin-bottom: 0.625rem; margin-top: 0.625rem; padding: 0px;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Aceste programe sunt adesea denumite PUP (programe potențial nedorite) și nu au nimic de-a face cu programul pe care încercați să îl descărcați și să-l instalați.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Site-ul de descărcare câștigă bani de la producătorii acestor programe, incluzându-i pe aceia pe care îi urmați.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; font-size: 16px; font-weight: 400; margin-bottom: 0.625rem; margin-top: 0.625rem; padding: 0px;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Facem tot posibilul pentru a evita conectarea la site-uri care folosesc instalatori și managerii de descărcări, dar uneori este imposibil, pur și simplu pentru că software-ul pe care îl recomand nu este disponibil în altă parte.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; font-size: 16px; font-weight: 400; margin-bottom: 0.625rem; margin-top: 0.625rem; padding: 0px;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Presupunând că nu puteți găsi un link de descărcare care nu este instalat pentru software-ul dorit, puteți oricând să instalați pachetul, fiind extrem de atent la ce sunteți de acord cu procesul de instalare:&lt;/span&gt;&lt;/div&gt;
&lt;/h3&gt;
&lt;h3 style=&quot;box-sizing: border-box; color: #101010; font-family: &amp;quot;Graphik Web&amp;quot;, HelveticaNeueBold, HelveticaNeue-Bold, &amp;quot;Helvetica Neue Bold&amp;quot;, HelveticaBold, Helvetica-Bold, &amp;quot;Helvetica Bold&amp;quot;, HelveticaNeue, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 1.125rem; line-height: 1.375rem; margin: 2rem 0px 0px; overflow-wrap: break-word; padding: 0px; word-wrap: break-word;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Alegeți &quot;Instalare particularizată&quot; și declinați software-ul suplimentar&lt;/span&gt;&lt;/h3&gt;
&lt;h3 style=&quot;box-sizing: border-box; color: #101010; font-family: &amp;quot;Graphik Web&amp;quot;, HelveticaNeueBold, HelveticaNeue-Bold, &amp;quot;Helvetica Neue Bold&amp;quot;, HelveticaBold, Helvetica-Bold, &amp;quot;Helvetica Bold&amp;quot;, HelveticaNeue, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 1.125rem; line-height: 1.375rem; margin: 2rem 0px 0px; overflow-wrap: break-word; padding: 0px; word-wrap: break-word;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; font-size: 16px; font-weight: 400; margin-bottom: 0.625rem; margin-top: 0.625rem; padding: 0px;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Nu în ultimul rând,&amp;nbsp;&lt;/span&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;vă rugăm să încetiniți și să citiți ecranele la care vă prezentați când instalați software-ul pe care tocmai l-ați descărcat&lt;/em&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; font-size: 16px; font-weight: 400; margin-bottom: 0.625rem; margin-top: 0.625rem; padding: 0px;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Nu vorbesc despre termenii și condițiile sau despre politica de confidențialitate.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Nu mă înțelegeți greșit, ar trebui să le citiți și pe ei, dar asta este o altă discuție.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; font-size: 16px; font-weight: 400; margin-bottom: 0.625rem; margin-top: 0.625rem; padding: 0px;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Ceea ce este important aici sunt ecranele care fac parte din expertul de instalare: ecranele cu casetele de selectare, butoanele &quot;următor&quot; și toate lucrurile pe care le accepți sau dezactivați pentru a permite instalarea sau urmărirea.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; font-size: 16px; font-weight: 400; margin-bottom: 0.625rem; margin-top: 0.625rem; padding: 0px;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Cu excepția cazului în care vă plac barele de instrumente ale browserului, pagina dvs. de pornire fiind modificată în mod automat, abonamentele la software liber pe care nu le veți utiliza și alte chestii asemănătoare, atunci vă recomandăm să citiți cu atenție fiecare ecran din expertul de instalare și să refuzați orice &quot; nu te interesează.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; font-size: 16px; font-weight: 400; margin-bottom: 0.625rem; margin-top: 0.625rem; padding: 0px;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Cel mai mare sfat pe care îl avem aici este să alegeți&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;metoda de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;instalare personalizată&lt;/em&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;dacă vi se oferă opțiunea.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Acest lucru face ca procesul de instalare să fie mai lung cu câteva ecrane suplimentare pe care le adaugă, dar este aproape întotdeauna în cazul în care opțiunile &quot;Nu instalați acest lucru&quot; sunt ascunse.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; font-size: 16px; font-weight: 400; margin-bottom: 0.625rem; margin-top: 0.625rem; padding: 0px;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;O modalitate de a evita toate aceste probleme de instalare este alegerea&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;software-ului&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;portabil&lt;/em&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;în loc de&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;software-ul&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;instalabil&lt;/em&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;, atunci când este disponibil.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Mulți producători de software creează versiuni ale programelor care rulează fără a fi nevoie să fie instalate deloc.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/h3&gt;
&lt;h3 style=&quot;box-sizing: border-box; color: #101010; font-family: &amp;quot;Graphik Web&amp;quot;, HelveticaNeueBold, HelveticaNeue-Bold, &amp;quot;Helvetica Neue Bold&amp;quot;, HelveticaBold, Helvetica-Bold, &amp;quot;Helvetica Bold&amp;quot;, HelveticaNeue, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 1.125rem; line-height: 1.375rem; margin: 2rem 0px 0px; overflow-wrap: break-word; padding: 0px; word-wrap: break-word;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Sfaturi avansate: verificați integritatea fișierelor și utilizați un scaner online de virusi&lt;/span&gt;&lt;/h3&gt;
&lt;h3 style=&quot;box-sizing: border-box; color: #101010; font-family: &amp;quot;Graphik Web&amp;quot;, HelveticaNeueBold, HelveticaNeue-Bold, &amp;quot;Helvetica Neue Bold&amp;quot;, HelveticaBold, Helvetica-Bold, &amp;quot;Helvetica Bold&amp;quot;, HelveticaNeue, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 1.125rem; line-height: 1.375rem; margin: 2rem 0px 0px; overflow-wrap: break-word; padding: 0px; word-wrap: break-word;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; font-size: 16px; font-weight: 400; margin-bottom: 0.625rem; margin-top: 0.625rem; padding: 0px;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Dacă sunteți mai mult decât un utilizator de computer novice, vă mai aduc în minte încă două lucruri care ar trebui să ușureze orice preocupare cu privire la ceea ce descărcați și instalați:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; font-size: 16px; font-weight: 400; margin-bottom: 0.625rem; margin-top: 0.625rem; padding: 0px;&quot;&gt;
&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;Scanați fișierul pentru programe malware înainte de al descărca&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; font-size: 16px; font-weight: 400; margin-bottom: 0.625rem; margin-top: 0.625rem; padding: 0px;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Dacă sunteți preocupat de faptul că un program pe care doriți să îl descărcați ar putea fi infectat cu malware, nu trebuie să îl descărcați și să-l scanați singur, ceea ce poate fi puțin riscant.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; font-size: 16px; font-weight: 400; margin-bottom: 0.625rem; margin-top: 0.625rem; padding: 0px;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Un&amp;nbsp;&lt;/span&gt;&lt;a data-component=&quot;link&quot; data-ordinal=&quot;15&quot; data-source=&quot;inlineLink&quot; data-type=&quot;externalLink&quot; href=&quot;https://www.thebalance.com/free-online-virus-scanners-1356651&quot; rel=&quot;nofollow noopener&quot; style=&quot;box-shadow: rgb(0, 93, 127) 0px -2px 0px inset; box-sizing: border-box; color: #005d7f; outline: 0px; padding-bottom: 1px; text-decoration-line: none; transition: all 0.15s ease-in-out 0s;&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;serviciu online gratuit de scanare a virușilor,&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;cum ar fi&amp;nbsp;&lt;/span&gt;&lt;a data-component=&quot;link&quot; data-ordinal=&quot;16&quot; data-source=&quot;inlineLink&quot; data-type=&quot;externalLink&quot; href=&quot;https://www.virustotal.com/&quot; rel=&quot;nofollow noopener&quot; style=&quot;box-shadow: rgb(0, 93, 127) 0px -2px 0px inset; box-sizing: border-box; color: #005d7f; outline: 0px; padding-bottom: 1px; text-decoration-line: none; transition: all 0.15s ease-in-out 0s;&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;VirusTotal,&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;va descărca fișierul&amp;nbsp;&lt;/span&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;pe&lt;/em&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;serverele sale, îl va scana pentru programe malware folosind toate programele antivirus majore și apoi va raporta rezultatele lor.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; font-size: 16px; font-weight: 400; margin-bottom: 0.625rem; margin-top: 0.625rem; padding: 0px;&quot;&gt;
&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;Verificați integritatea fișierului descărcat&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; font-size: 16px; font-weight: 400; margin-bottom: 0.625rem; margin-top: 0.625rem; padding: 0px;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Dacă vă faceți griji că ați fost posibil să fi descărcat ceva diferit de cel pe care l-ați așteptat, este&amp;nbsp;&lt;/span&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;posibil&lt;/em&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;să puteți verifica pentru a vedea că ceea ce aveți este ceea ce trebuia să obțineți.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; font-size: 16px; font-weight: 400; margin-bottom: 0.625rem; margin-top: 0.625rem; padding: 0px;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Unele site-uri web oferă ceva numit&amp;nbsp;&lt;/span&gt;&lt;a data-component=&quot;link&quot; data-ordinal=&quot;17&quot; data-source=&quot;inlineLink&quot; data-type=&quot;internalLink&quot; href=&quot;https://www.lifewire.com/what-does-checksum-mean-2625825&quot; style=&quot;box-shadow: rgb(0, 93, 127) 0px -2px 0px inset; box-sizing: border-box; color: #005d7f; outline: 0px; padding-bottom: 1px; text-decoration-line: none; transition: all 0.15s ease-in-out 0s;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;valoare de control&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;cu descărcările lor.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Va arăta ca un șir lung de litere și numere.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;După descărcare, puteți utiliza un&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;calculator de control de cont&lt;/em&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;pentru a produce ceea ce este, sperăm, o potrivire exactă cu valoarea de control sumă listată cu descărcarea.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; font-size: 16px; font-weight: 400; margin-bottom: 0.625rem; margin-top: 0.625rem; padding: 0px;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Consultați&amp;nbsp;&lt;/span&gt;&lt;a data-component=&quot;link&quot; data-ordinal=&quot;18&quot; data-source=&quot;inlineLink&quot; data-type=&quot;internalLink&quot; href=&quot;https://www.lifewire.com/how-to-verify-file-integrity-in-windows-with-fciv-2625186&quot; style=&quot;box-shadow: rgb(0, 93, 127) 0px -2px 0px inset; box-sizing: border-box; color: #005d7f; outline: 0px; padding-bottom: 1px; text-decoration-line: none; transition: all 0.15s ease-in-out 0s;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Cum se verifică integritatea fișierelor în Windows Cu FCIV&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;pentru un tutorial complet.&lt;/span&gt;&lt;/div&gt;
&lt;/h3&gt;
&lt;h3 style=&quot;box-sizing: border-box; color: #101010; font-family: &amp;quot;Graphik Web&amp;quot;, HelveticaNeueBold, HelveticaNeue-Bold, &amp;quot;Helvetica Neue Bold&amp;quot;, HelveticaBold, Helvetica-Bold, &amp;quot;Helvetica Bold&amp;quot;, HelveticaNeue, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 1.125rem; line-height: 1.375rem; margin: 2rem 0px 0px; overflow-wrap: break-word; padding: 0px; word-wrap: break-word;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Care site-uri de descărcare sunt cele mai bune?&lt;/span&gt;&lt;/h3&gt;
&lt;h3 style=&quot;box-sizing: border-box; color: #101010; font-family: &amp;quot;Graphik Web&amp;quot;, HelveticaNeueBold, HelveticaNeue-Bold, &amp;quot;Helvetica Neue Bold&amp;quot;, HelveticaBold, Helvetica-Bold, &amp;quot;Helvetica Bold&amp;quot;, HelveticaNeue, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 1.125rem; line-height: 1.375rem; margin: 2rem 0px 0px; overflow-wrap: break-word; padding: 0px; word-wrap: break-word;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; font-size: 16px; font-weight: 400; margin-bottom: 0.625rem; margin-top: 0.625rem; padding: 0px;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;În general, site-ul unui dezvoltator este cel mai sigur pariu pentru descărcarea de software, dar nu-și găzduiește întotdeauna propriile programe.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; font-size: 16px; font-weight: 400; margin-bottom: 0.625rem; margin-top: 0.625rem; padding: 0px;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;În ceea ce privește site-urile de descărcare, evităm următoarele,&amp;nbsp;&lt;/span&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;atunci când putem&lt;/em&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;, din cauza tendinței lor de a include instalatori ori de câte ori este posibil:&lt;/span&gt;&lt;/div&gt;
&lt;ul style=&quot;box-sizing: border-box; font-size: 16px; font-weight: 400; list-style: none; margin: 1.25rem 1.3rem; padding: 0px; position: relative; z-index: 1;&quot;&gt;
&lt;li style=&quot;box-sizing: border-box; list-style-type: none; margin: 0px 0px 0.625rem; padding: 0px;&quot;&gt;&lt;span class=&quot;skimlinks-unlinked&quot; style=&quot;box-sizing: border-box;&quot;&gt;Download.com&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;[&amp;nbsp;&lt;/span&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;skimlinks-unlinked&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;www.download.com&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;]&lt;/span&gt;&lt;/span&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;skimlinks-unlinked&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;box-sizing: border-box; list-style-type: none; margin: 0px 0px 0.625rem; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;BrotherSoft [&amp;nbsp;&lt;/span&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;skimlinks-unlinked&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;www.brothersoft.com&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;]&lt;/span&gt;&lt;/span&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;skimlinks-unlinked&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;box-sizing: border-box; list-style-type: none; margin: 0px 0px 0.625rem; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Softonic [&amp;nbsp;&lt;/span&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;skimlinks-unlinked&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;www.softonic.com&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;]&lt;/span&gt;&lt;/span&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;skimlinks-unlinked&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;box-sizing: border-box; list-style-type: none; margin: 0px 0px 0.625rem; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Freeware Fișiere [&amp;nbsp;&lt;/span&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;skimlinks-unlinked&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;www.freewarefiles.com&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;]&lt;/span&gt;&lt;/span&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;skimlinks-unlinked&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;box-sizing: border-box; list-style-type: none; margin: 0px 0px 0.625rem; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;skimlinks-unlinked&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Tucows&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;[&amp;nbsp;&lt;/span&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;skimlinks-unlinked&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;www.tucows.com&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;]&lt;/span&gt;&lt;/span&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;skimlinks-unlinked&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;box-sizing: border-box; list-style-type: none; margin: 0px 0px 0.625rem; padding: 0px;&quot;&gt;&lt;span class=&quot;skimlinks-unlinked&quot; style=&quot;box-sizing: border-box;&quot;&gt;FileHippo.com&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;[&amp;nbsp;&lt;/span&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;skimlinks-unlinked&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;www.filehippo.com&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;]&lt;/span&gt;&lt;/span&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;skimlinks-unlinked&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;box-sizing: border-box; list-style-type: none; margin: 0px 0px 0.625rem; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;SourceForge [&amp;nbsp;&lt;/span&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;skimlinks-unlinked&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;www.sourceforge.com&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;]&lt;/span&gt;&lt;/span&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;skimlinks-unlinked&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;box-sizing: border-box; font-size: 16px; font-weight: 400; margin-bottom: 0.625rem; margin-top: 0.625rem; padding: 0px;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;În timp ce aceste site-uri de descărcare nu pot fi 100% libere de manageri de descărcare și de instalatori care se strecoară, rareori dacă le vedem vreodată:&lt;/span&gt;&lt;/div&gt;
&lt;ul style=&quot;box-sizing: border-box; font-size: 16px; font-weight: 400; list-style: none; margin: 1.25rem 1.3rem; padding: 0px; position: relative; z-index: 1;&quot;&gt;
&lt;li style=&quot;box-sizing: border-box; list-style-type: none; margin: 0px 0px 0.625rem; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;LO4D.com [&amp;nbsp;&lt;/span&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;skimlinks-unlinked&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;www.lo4d.com&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;]&lt;/span&gt;&lt;/span&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;skimlinks-unlinked&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;box-sizing: border-box; list-style-type: none; margin: 0px 0px 0.625rem; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;MajorGeeks [&amp;nbsp;&lt;/span&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;skimlinks-unlinked&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;www.majorgeeks.com&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;]&lt;/span&gt;&lt;/span&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;skimlinks-unlinked&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;box-sizing: border-box; list-style-type: none; margin: 0px 0px 0.625rem; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;TechSpot [&amp;nbsp;&lt;/span&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;skimlinks-unlinked&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;www.techspot.com/downloads&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;]&lt;/span&gt;&lt;/span&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;skimlinks-unlinked&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;box-sizing: border-box; list-style-type: none; margin: 0px 0px 0.625rem; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Softpedia [&amp;nbsp;&lt;/span&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;skimlinks-unlinked&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;www.softpedia.com&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;]&lt;/span&gt;&lt;/span&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;skimlinks-unlinked&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;box-sizing: border-box; list-style-type: none; margin: 0px 0px 0.625rem; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;SnapFiles [&amp;nbsp;&lt;/span&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;skimlinks-unlinked&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;www.snapfiles.com&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;]&lt;/span&gt;&lt;/span&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;skimlinks-unlinked&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;box-sizing: border-box; list-style-type: none; margin: 0px 0px 0.625rem; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Betanews [&amp;nbsp;&lt;/span&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;skimlinks-unlinked&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;fileforum.betanews.com&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;]&lt;/span&gt;&lt;/span&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;skimlinks-unlinked&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;box-sizing: border-box; list-style-type: none; margin: 0px 0px 0.625rem; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Uptodown [&amp;nbsp;&lt;/span&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;skimlinks-unlinked&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;uptodown.com&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;]&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/h3&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;a href=&quot;https://filehippo.com/download_mypublicwifi/&quot;&gt;&lt;img src=&quot;https://images.filehippo.net/img/ex/4901__my_public_wifi_icon.png&quot; /&gt;MyPublicWiFi 5.1&lt;/a&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;https://filehippo.com/download_autovpnconnect/&quot;&gt;&lt;img src=&quot;https://images.filehippo.net/img/ex/3583__AutoVPNConnect_icon.png&quot; /&gt;AutoVPNConnect 3.1&lt;/a&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;a href=&quot;https://filehippo.com/download_my_wifi_router/&quot;&gt;&lt;img src=&quot;https://images.filehippo.net/img/ex/5348__my_wifi_router_icon.png&quot; /&gt;My WiFi Router 3.0&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span face=&quot;&amp;quot;Segoe UI&amp;quot;, -apple-system, BlinkMacSystemFont, Roboto, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Ubuntu, Arial, sans-serif&quot; style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Instrumentul Windows USB / DVD Download vă permite să creați o copie a fișierului ISO Windows 7/8 pe o unitate flash USB sau pe un DVD.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pentru a crea un DVD bootabil sau o unitate flash USB, descărcați fișierul ISO și apoi executați instrumentul Windows 7 USB / DVD Download.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Odată ce acest lucru este făcut, puteți instala Windows 7 sau Windows 8 direct de pe unitatea flash USB sau DVD.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, -apple-system, BlinkMacSystemFont, Roboto, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Ubuntu, Arial, sans-serif;&quot; /&gt;&lt;br style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, -apple-system, BlinkMacSystemFont, Roboto, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Ubuntu, Arial, sans-serif;&quot; /&gt;&lt;span face=&quot;&amp;quot;Segoe UI&amp;quot;, -apple-system, BlinkMacSystemFont, Roboto, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Ubuntu, Arial, sans-serif&quot; style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Fișierul ISO conține toate fișierele de instalare Windows combinate într-un singur fișier necomprimat.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Când descărcați fișierul ISO, trebuie să îl copiați pe un mediu pentru a instala Windows.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest instrument vă permite să creați o copie a fișierului ISO pe o unitate flash USB sau pe un DVD.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pentru a instala Windows de pe unitatea flash USB sau DVD, tot ce trebuie să faceți este să introduceți unitatea flash USB în portul USB sau să introduceți DVD-ul în unitatea DVD și să executați Setup.exe din dosarul rădăcină al unității.&lt;/span&gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, -apple-system, BlinkMacSystemFont, Roboto, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Ubuntu, Arial, sans-serif;&quot; /&gt;&lt;br style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, -apple-system, BlinkMacSystemFont, Roboto, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Ubuntu, Arial, sans-serif;&quot; /&gt;&lt;span face=&quot;&amp;quot;Segoe UI&amp;quot;, -apple-system, BlinkMacSystemFont, Roboto, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Ubuntu, Arial, sans-serif&quot; style=&quot;vertical-align: inherit;&quot;&gt;Notă: Nu puteți instala Windows din fișierul ISO până când îl copiați pe o unitate flash USB sau DVD cu instrumentul de descărcare USB / DVD de pe Windows 7 și instalați de acolo.&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, -apple-system, BlinkMacSystemFont, Roboto, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Ubuntu, Arial, sans-serif;&quot; /&gt;&lt;br style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, -apple-system, BlinkMacSystemFont, Roboto, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Ubuntu, Arial, sans-serif;&quot; /&gt;&lt;span face=&quot;&amp;quot;Segoe UI&amp;quot;, -apple-system, BlinkMacSystemFont, Roboto, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Ubuntu, Arial, sans-serif&quot; style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Copia fișierului ISO pe care creează instrumentul Windows USB / DVD Download este bootabilă.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Mijloacele bootabile vă permit să instalați Windows 7 fără a trebui să rulați mai întâi un sistem de operare existent pe aparat.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă schimbați ordinea de încărcare a unităților în BIOS-ul computerului, puteți rula instalarea Windows 7 direct de pe unitatea flash USB sau DVD-ul când porniți computerul.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Consultați documentația pentru computerul dvs. pentru informații despre schimbarea ordinii de boot a unităților de disc BIOS.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://infotestpc.blogspot.com/feeds/5670349562212501708/comments/default' title='Postare comentarii'/><link rel='replies' type='text/html' href='http://infotestpc.blogspot.com/2018/01/usb-tool.html#comment-form' title='0 comentarii'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5038728009841547747/posts/default/5670349562212501708'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5038728009841547747/posts/default/5670349562212501708'/><link rel='alternate' type='text/html' href='http://infotestpc.blogspot.com/2018/01/usb-tool.html' title='USB Tool'/><author><name>Al Con</name><uri>http://www.blogger.com/profile/17409243868650327707</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAiR50Sp45q0R1tEpX6BCNhC4TYoFQvHjFZxuLO1DKuoubzH8nqs_l-x5vwaDxE4BN-j8gXaU3Y2mDCkl1zUslIwiLZ4Nqe7vpPNZwoFwJoFWLjOHb1Raw_Lox1xoJBD81dhU6oa3GrQ/s72-c/stick-bootabil-windows-7.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5038728009841547747.post-8037548977852908480</id><published>2018-01-17T17:17:00.001-08:00</published><updated>2020-12-16T12:08:28.073-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="BAZE DE DATE"/><category scheme="http://www.blogger.com/atom/ns#" term="Calculatorul"/><category scheme="http://www.blogger.com/atom/ns#" term="Conexiune"/><category scheme="http://www.blogger.com/atom/ns#" term="Internet"/><category scheme="http://www.blogger.com/atom/ns#" term="Kali Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="Module"/><category scheme="http://www.blogger.com/atom/ns#" term="Retele"/><category scheme="http://www.blogger.com/atom/ns#" term="Server"/><category scheme="http://www.blogger.com/atom/ns#" term="Site"/><title type='text'>Conexiunea la Internet în Linux</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEig0Yxxg81daCzYIHulrp3mOI60NqMxtoBaRulRCXQkxGe095NxDkot0gnXbhXzx6syiER35tl4Lm4xpkV8Dzo1Lcb1VeiFrCEFGyHsSp9xZOobcFTwXcBrceXHearcl7pN0TvSaZ_UGg/s591/22279590_1924695991128582.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;504&quot; data-original-width=&quot;591&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEig0Yxxg81daCzYIHulrp3mOI60NqMxtoBaRulRCXQkxGe095NxDkot0gnXbhXzx6syiER35tl4Lm4xpkV8Dzo1Lcb1VeiFrCEFGyHsSp9xZOobcFTwXcBrceXHearcl7pN0TvSaZ_UGg/s320/22279590_1924695991128582.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;br /&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #222222; font-family: &amp;quot;Helvetica Neue&amp;quot;, Arial, sans-serif; font-size: 1.125rem; line-height: 1.875rem; margin-bottom: 16px; max-width: 620px; padding: 0px; transition: margin 0.3s ease 0s;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Software-ul NetworkManager inclus de Ubuntu are scopul de a face ca conexiunile dvs. de rețea să &quot;funcționeze&quot;. Cu toate acestea, uneori lucrurile merg prost.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Există momente în care trebuie să ajustați sau să modificați setările de conectare, în special atunci când utilizați un laptop - la&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a automate_uuid=&quot;186aaba9-c6aa-45ea-ae47-b46778138378&quot; href=&quot;http://www.pcworld.com/article/224311/windows_networking_troubleshooting_tips.html&quot; style=&quot;box-sizing: border-box; color: #25a7d7; text-decoration-line: none;&quot;&gt;fel ca în Windows&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #222222; font-family: &amp;quot;Helvetica Neue&amp;quot;, Arial, sans-serif; font-size: 1.125rem; line-height: 1.875rem; margin-bottom: 16px; max-width: 620px; padding: 0px; transition: margin 0.3s ease 0s;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Din fericire, nu va trebui să scoateți terminalul și să tastați orice comenzi arcane pentru a vă face conexiunea la Internet să funcționeze.&lt;/span&gt;&lt;/div&gt;
&lt;h2 style=&quot;background-color: white; box-sizing: border-box; color: #222222; font-family: facitweb, sans-serif; font-size: 1.8rem; line-height: 2.1rem; margin: 1.625rem 0px 16px; max-width: 620px; padding: 0px; transition: margin 0.3s ease 0s;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Verificați mai întâi elementele de bază&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #222222; font-family: &amp;quot;Helvetica Neue&amp;quot;, Arial, sans-serif; font-size: 1.125rem; line-height: 1.875rem; margin-bottom: 16px; max-width: 620px; padding: 0px; transition: margin 0.3s ease 0s;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Înainte de a da vina pe Ubuntu, încercați să vă conectați la Internet pe alte dispozitive.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Dacă se confruntă cu aceeași problemă, nu este cu Ubuntu - este cu altceva.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;De exemplu, poate fi necesar să&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a automate_uuid=&quot;4238a147-b51d-48ac-bdf9-bcd272c82d8a&quot; href=&quot;http://www.pcworld.com/article/260524/how_to_fix_your_wi_fi_network_7_tips.html&quot; style=&quot;box-sizing: border-box; color: #25a7d7; text-decoration-line: none;&quot;&gt;reporniți ruterul, modemul sau ambele&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Merită întotdeauna să verificați aceste elemente fundamentale înainte de a vă deplasa în depanare.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;aside class=&quot;fakesidebar fakesidebar-auto&quot; id=&quot;fsb-2089&quot; style=&quot;background-color: white; box-sizing: border-box; color: #222222; font-family: facitweb, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif, sans-serif; font-size: 1rem; line-height: 1.625rem; margin: 0px 0px 1rem; max-width: 620px; overflow-x: auto;&quot;&gt;&lt;a automate_uuid=&quot;45783992-ac98-4b48-b7b0-a1bada2acee6&quot; href=&quot;https://www.pcworld.com/article/3150765/4-easy-linux-projects-for-newbies-and-intermediate-users&quot; style=&quot;box-sizing: border-box; color: #25a7d7; text-decoration-line: none;&quot;&gt;[Citirea ulterioară: 4 proiecte Linux pentru începători și utilizatori intermediari]&lt;/a&gt;&lt;/aside&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #222222; font-family: &amp;quot;Helvetica Neue&amp;quot;, Arial, sans-serif; font-size: 1.125rem; line-height: 1.875rem; margin-bottom: 16px; max-width: 620px; padding: 0px; transition: margin 0.3s ease 0s;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Unele laptopuri au comutatoare hardware care pot fi comutate pentru a activa sau dezactiva rapid Wi-Fi.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;În cazul în care dispozitivul Wi-Fi nu pare să funcționeze deloc, verificați comutatorul Wi-Fi al laptopului.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #222222; font-family: &amp;quot;Helvetica Neue&amp;quot;, Arial, sans-serif; font-size: 1.125rem; line-height: 1.875rem; margin-bottom: 16px; max-width: 620px; padding: 0px; transition: margin 0.3s ease 0s;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;ol style=&quot;font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 16px; margin-bottom: 0px; margin-top: 0px; text-align: justify;&quot;&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: #050505; font-family: Arial; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;https://mateisoscel.blogspot.com/2020/12/ce-sa-mai-citim.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 18pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Ce să mai citim?&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;a href=&quot;https://mateisoscel.blogspot.com/2020/12/ce-sa-mai-citim.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Ce să mai citim?&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;a href=&quot;https://anunturigratuitenet.blogspot.com/2012/09/specialisti-in-domeniul-it.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Tatăl fondator al Uniunii Europene.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;a href=&quot;https://alecscon.blogspot.com/2013/01/colonizarea-de-pe-marte.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Colonizarea de pe Marte !&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #050505; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;https://alecscon.blogspot.com/2012/08/robot-pe-marte.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Ne pregătim pentru Marte&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;a href=&quot;https://alecscon.blogspot.com/2012/08/robot-pe-marte.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Colonizarea Marte poate determina umanitatea să-și modifice ADN-ul ?&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: #050505; font-family: Arial; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;a href=&quot;https://blogulucovid.blogspot.com/2020/12/cine-mai-uraste-sa-poarte-o-masca.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;Cine mai urăște să poarte mască?&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #222222; font-family: &amp;quot;Helvetica Neue&amp;quot;, Arial, sans-serif; font-size: 1.125rem; line-height: 1.875rem; margin-bottom: 16px; max-width: 620px; padding: 0px; transition: margin 0.3s ease 0s;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Dacă utilizați o conexiune prin cablu, asigurați-vă că cablul ethernet este conectat ferm atât la portul Ethernet al computerului, cât și la portul Ethernet al routerului.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Sigur, acest lucru poate părea un pic evident, dar este ușor să pierdeți un întrerupător accidentat sau un cablu slăbit.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #222222; font-family: &amp;quot;Helvetica Neue&amp;quot;, Arial, sans-serif; font-size: 1.125rem; line-height: 1.875rem; margin-bottom: 16px; max-width: 620px; padding: 0px; transition: margin 0.3s ease 0s;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Pentru a rezolva problemele legate de puterea semnalului cu rețelele Wi-Fi, aranjați routerul, computerul și alte obiecte din casă pentru&amp;nbsp;&lt;/span&gt;&lt;a automate_uuid=&quot;e5809fce-ebf5-4c1f-8f51-9f3390f477a5&quot; href=&quot;http://www.pcworld.com/article/225623/fix_your_wifi_free_tweaks_and_major_overhauls.html&quot; style=&quot;box-sizing: border-box; color: #25a7d7; text-decoration-line: none;&quot;&gt;a&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;obține&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;a automate_uuid=&quot;92505296-6670-4f0f-96fe-be3ccb7bae88&quot; href=&quot;http://www.pcworld.com/article/225623/fix_your_wifi_free_tweaks_and_major_overhauls.html&quot; style=&quot;box-sizing: border-box; color: #25a7d7; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;cea mai bună putere a semnalului Wi-Fi&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h2 style=&quot;background-color: white; box-sizing: border-box; color: #222222; font-family: facitweb, sans-serif; font-size: 1.8rem; line-height: 2.1rem; margin: 1.625rem 0px 16px; max-width: 620px; padding: 0px; transition: margin 0.3s ease 0s;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Configurați setările de conectare în NetworkManager&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #222222; font-family: &amp;quot;Helvetica Neue&amp;quot;, Arial, sans-serif; font-size: 1.125rem; line-height: 1.875rem; margin-bottom: 16px; max-width: 620px; padding: 0px; transition: margin 0.3s ease 0s;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;NetworkManager se conectează la rețelele Wi-Fi și configurează automat conexiunile de rețea prin cablu atunci când conectați un cablu ethernet.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Înainte de NetworkManager, va trebui să faceți acest lucru cu comenzile terminale.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #222222; font-family: &amp;quot;Helvetica Neue&amp;quot;, Arial, sans-serif; font-size: 1.125rem; line-height: 1.875rem; margin-bottom: 16px; max-width: 620px; padding: 0px; transition: margin 0.3s ease 0s;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;color: #666666; font-size: 15px;&quot;&gt;Meniul pop-up pentru NetworkManager apare când faceți clic pe pictograma de conectare (fie prin cablu sau fără fir) în zona de notificări a Ubuntu.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #222222; font-family: &amp;quot;Helvetica Neue&amp;quot;, Arial, sans-serif; font-size: 1.125rem; line-height: 1.875rem; margin-bottom: 16px; max-width: 620px; padding: 0px; transition: margin 0.3s ease 0s;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Dacă ceva nu funcționează corect, este posibil să fie necesar să configurați NetworkManager.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Faceți clic pe conexiunea de rețea sau pe pictograma Wi-Fi din panoul din colțul din dreapta sus al ecranului pentru a accesa meniul NetworkManager, apoi alegeți o rețea.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Dacă aveți nevoie să vizualizați informații despre conexiunea dvs. în scopuri de depanare - adresa IP a computerului dvs., de exemplu, faceți clic pe&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Informații conexiune&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #222222; font-family: &amp;quot;Helvetica Neue&amp;quot;, Arial, sans-serif; font-size: 1.125rem; line-height: 1.875rem; margin-bottom: 16px; max-width: 620px; padding: 0px; transition: margin 0.3s ease 0s;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;color: #666666; font-size: 15px;&quot;&gt;Fereastra Informații despre conexiunea NetworkManager afișează toate detaliile despre conexiunile dvs. active, inclusiv interfața de rețea, securitatea și viteza de conectare, precum și adresele MAC și IP.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #222222; font-family: &amp;quot;Helvetica Neue&amp;quot;, Arial, sans-serif; font-size: 1.125rem; line-height: 1.875rem; margin-bottom: 16px; max-width: 620px; padding: 0px; transition: margin 0.3s ease 0s;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Dacă conexiunea la rețea locală nu funcționează, asigurați-vă că opțiunile Activare rețea și Activare Wi-Fi sunt selectate aici în meniu.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Aceste opțiuni vă permit să dezactivați rapid și să activați conexiunile, ceea ce este util pentru a vă pune laptopul în&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a automate_uuid=&quot;1f407c1f-8578-426e-af1b-7d498e32492f&quot; href=&quot;http://www.pcworld.com/article/2064685/how-to-live-large-on-every-battery-charge.html&quot; style=&quot;box-sizing: border-box; color: #25a7d7; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;modul avion&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Dacă ați dezactivat accidental, nu veți avea o conexiune la Internet până când nu le reactivați.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #222222; font-family: &amp;quot;Helvetica Neue&amp;quot;, Arial, sans-serif; font-size: 1.125rem; line-height: 1.875rem; margin-bottom: 16px; max-width: 620px; padding: 0px; transition: margin 0.3s ease 0s;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;color: #666666; font-size: 15px;&quot;&gt;NetworkManager vă permite să gestionați mai multe conexiuni de rețea și să utilizați diferite setări pentru fiecare.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #222222; font-family: &amp;quot;Helvetica Neue&amp;quot;, Arial, sans-serif; font-size: 1.125rem; line-height: 1.875rem; margin-bottom: 16px; max-width: 620px; padding: 0px; transition: margin 0.3s ease 0s;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Configurați conexiunile făcând clic pe&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Editați conexiunile&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Veți vedea o fereastră cu una sau mai multe conexiuni, în funcție de câte adaptoare de rețea aveți pe computer.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Selectați o conexiune și faceți clic pe&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Editați&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;pentru a modifica setările.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #222222; font-family: &amp;quot;Helvetica Neue&amp;quot;, Arial, sans-serif; font-size: 1.125rem; line-height: 1.875rem; margin-bottom: 16px; max-width: 620px; padding: 0px; transition: margin 0.3s ease 0s;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Asigurați-vă că opțiunea &quot;Conectare automată la această rețea când este disponibilă&quot; este activată în fila General.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Dacă este dezactivată, NetworkManager nu se va conecta automat la o rețea cu fir sau fără fir atunci când porniți computerul.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #222222; font-family: &amp;quot;Helvetica Neue&amp;quot;, Arial, sans-serif; font-size: 1.125rem; line-height: 1.875rem; margin-bottom: 16px; max-width: 620px; padding: 0px; transition: margin 0.3s ease 0s;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;NetworkManager utilizează în mod implicit Dynamic Host Configuration Protocol (DHCP), astfel încât computerul dvs. va încerca să obțină automat setările de conexiune - adresa IP, serverele DNS și gateway-ul implicit - de la router sau de la furnizorul de servicii Internet.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #222222; font-family: &amp;quot;Helvetica Neue&amp;quot;, Arial, sans-serif; font-size: 1.125rem; line-height: 1.875rem; margin-bottom: 16px; max-width: 620px; padding: 0px; transition: margin 0.3s ease 0s;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #222222; font-family: &amp;quot;Helvetica Neue&amp;quot;, Arial, sans-serif; font-size: 1.125rem; line-height: 1.875rem; margin-bottom: 16px; max-width: 620px; padding: 0px; transition: margin 0.3s ease 0s;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Pentru rețelele care necesită o&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;a automate_uuid=&quot;2b96a92c-6f34-4f11-aa03-97cf7dc8889f&quot; href=&quot;http://www.pcworld.com/article/243224/mastering_static_ip_addresses.html&quot; style=&quot;box-sizing: border-box; color: #25a7d7; text-decoration-line: none;&quot;&gt;configurație IP statică&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;, va trebui să vizitați fie Setările IPv4, fie panoul Setări IPv6 și selectați metoda &quot;Manuală&quot;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;(Dacă nu sunteți sigur care utilizați, probabil că încă mai folosiți IPv4.) Introduceți detaliile pe care le cere conexiunea dvs. aici - ISP sau administratorul de rețea vă poate spune ce trebuie să introduceți dacă nu știți.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #222222; font-family: &amp;quot;Helvetica Neue&amp;quot;, Arial, sans-serif; font-size: 1.125rem; line-height: 1.875rem; margin-bottom: 16px; max-width: 620px; padding: 0px; transition: margin 0.3s ease 0s;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;color: #666666; font-size: 15px;&quot;&gt;Puteți configura ușor conexiunea pentru a utiliza setările manuale și pentru a introduce aceste setări în NetworkManager.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #222222; font-family: &amp;quot;Helvetica Neue&amp;quot;, Arial, sans-serif; font-size: 1.125rem; line-height: 1.875rem; margin-bottom: 16px; max-width: 620px; padding: 0px; transition: margin 0.3s ease 0s;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Dacă, din anumite motive, rețeaua dvs. permite numai conectarea dispozitivelor care au o adresă MAC specifică, faceți clic pe&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;fila&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Ethernet&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;și introduceți acea informație în caseta &quot;Adresa MAC clonată&quot;.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #222222; font-family: &amp;quot;Helvetica Neue&amp;quot;, Arial, sans-serif; font-size: 1.125rem; line-height: 1.875rem; margin-bottom: 16px; max-width: 620px; padding: 0px; transition: margin 0.3s ease 0s;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Continuați să citiți mai multe despre verificarea driverelor Wi-Fi și a instrumentelor de diagnosticare .&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Sursa :&amp;nbsp;&lt;a href=&quot;https://www.pcworld.com/article/2455972/how-to-fix-your-internet-connection-in-ubuntu-linux.html&quot;&gt;https://www.pcworld.com/article/2455972/how-to-fix-your-internet-connection-in-ubuntu-linux.html&lt;/a&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://infotestpc.blogspot.com/feeds/8037548977852908480/comments/default' title='Postare comentarii'/><link rel='replies' type='text/html' href='http://infotestpc.blogspot.com/2018/01/conexiunea-la-internet-in-linux.html#comment-form' title='0 comentarii'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5038728009841547747/posts/default/8037548977852908480'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5038728009841547747/posts/default/8037548977852908480'/><link rel='alternate' type='text/html' href='http://infotestpc.blogspot.com/2018/01/conexiunea-la-internet-in-linux.html' title='Conexiunea la Internet în Linux'/><author><name>Al Con</name><uri>http://www.blogger.com/profile/17409243868650327707</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEig0Yxxg81daCzYIHulrp3mOI60NqMxtoBaRulRCXQkxGe095NxDkot0gnXbhXzx6syiER35tl4Lm4xpkV8Dzo1Lcb1VeiFrCEFGyHsSp9xZOobcFTwXcBrceXHearcl7pN0TvSaZ_UGg/s72-c/22279590_1924695991128582.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5038728009841547747.post-7629365386661664367</id><published>2018-01-17T16:48:00.001-08:00</published><updated>2020-12-16T12:09:38.966-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="BAZE DE DATE"/><category scheme="http://www.blogger.com/atom/ns#" term="Initiere"/><category scheme="http://www.blogger.com/atom/ns#" term="Internet"/><category scheme="http://www.blogger.com/atom/ns#" term="Module"/><category scheme="http://www.blogger.com/atom/ns#" term="procesorul"/><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><category scheme="http://www.blogger.com/atom/ns#" term="Sursa"/><title type='text'>Python pentru începători</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUMA9qk78-YyG-sdcuecaYnLPZM02ldlzjNDc7x8-WAwwEz9Nl7LBWmMQCsO5I17ZPx6QxV9mSOuf6PLSVmRmD0j3hnw19SmbgaB9qLuMj-B8Ny_BCivWJ0efxvezcWSCi86EjTdAedg/s294/Astronau%25C8%259Bii+1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;171&quot; data-original-width=&quot;294&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUMA9qk78-YyG-sdcuecaYnLPZM02ldlzjNDc7x8-WAwwEz9Nl7LBWmMQCsO5I17ZPx6QxV9mSOuf6PLSVmRmD0j3hnw19SmbgaB9qLuMj-B8Ny_BCivWJ0efxvezcWSCi86EjTdAedg/s0/Astronau%25C8%259Bii+1.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;simplesect&quot; lang=&quot;en&quot; style=&quot;background-color: white; font-family: Georgia, serif;&quot;&gt;
&lt;div class=&quot;titlepage&quot;&gt;
&lt;span style=&quot;color: blue; vertical-align: inherit;&quot;&gt;&lt;b&gt;Noțiuni de bază&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pentru a începe, dacă nu ați instalat interpretul Python pe sistemul dvs., acum este timpul.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pentru a face acest pas mai ușor, instalați ultima distribuție Python utilizând pachete compatibile cu distribuția dvs. Linux.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;rpm, deb și tgz sunt de asemenea disponibile pe CD-ul dvs. Linux sau on-line.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă urmați procedurile de instalare standard, nu trebuie să aveți probleme.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Apoi, citiți excelentul&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;emphasis&quot;&gt;&lt;em&gt;Tutorial Python&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;scris de Guido van Rossum, creatorul limbajului de programare Python.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest tutorial face parte din documentația oficială Python și îl puteți găsi în catalogul /usr/doc/python-docs-1.5.2 sau /usr/local/doc/python-docs-1.5.2.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acesta poate fi livrat în format LaTeX brut, care trebuie prelucrat mai întâi;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;dacă nu știți cum să faceți acest lucru, accesați&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a href=&quot;http://www.python.org/doc&quot; style=&quot;color: #003366; font-weight: bold; text-decoration-line: none;&quot;&gt;http://www.python.org/doc/&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;pentru al descărca într-un format alternativ.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De asemenea, vă recomandăm să aveți&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;emphasis&quot;&gt;&lt;em&gt;instrucțiunea Bibliotecii Python&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;la îndemână;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;ați putea dori atunci când explicațiile date aici nu corespund nevoilor dumneavoastră.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;O puteți găsi în aceleași locuri ca și&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;emphasis&quot;&gt;&lt;em&gt;Tutorialul Python&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Crearea de scripturi se poate face folosind editorul de text preferat atâta timp cât salvează textul în format ASCII simplu și nu introduce automat pauze de linie atunci când linia este mai lungă decât lățimea ferestrei editorului.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;simplesect&quot; lang=&quot;en&quot; style=&quot;background-color: white; font-family: Georgia, serif;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;simplesect&quot; lang=&quot;en&quot; style=&quot;background-color: white; font-family: Georgia, serif;&quot;&gt;&lt;ol style=&quot;color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 16px; margin-bottom: 0px; margin-top: 0px; text-align: justify;&quot;&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: #050505; font-family: Arial; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;https://mateisoscel.blogspot.com/2020/12/ce-sa-mai-citim.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 18pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Ce să mai citim?&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;a href=&quot;https://mateisoscel.blogspot.com/2020/12/ce-sa-mai-citim.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Ce să mai citim?&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;a href=&quot;https://anunturigratuitenet.blogspot.com/2012/09/specialisti-in-domeniul-it.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Tatăl fondator al Uniunii Europene.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;a href=&quot;https://alecscon.blogspot.com/2013/01/colonizarea-de-pe-marte.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Colonizarea de pe Marte !&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #050505; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;https://alecscon.blogspot.com/2012/08/robot-pe-marte.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Ne pregătim pentru Marte&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;a href=&quot;https://alecscon.blogspot.com/2012/08/robot-pe-marte.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Colonizarea Marte poate determina umanitatea să-și modifice ADN-ul ?&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: #050505; font-family: Arial; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;a href=&quot;https://blogulucovid.blogspot.com/2020/12/cine-mai-uraste-sa-poarte-o-masca.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;Cine mai urăște să poarte mască?&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div class=&quot;simplesect&quot; lang=&quot;en&quot; style=&quot;background-color: white; font-family: Georgia, serif;&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Începeți întotdeauna scenariile dvs. cu oricare dintre ele&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;programlisting&quot; style=&quot;color: #336699; overflow: auto;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;#! &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;/ Usr / local / bin / python
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sau&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;programlisting&quot; style=&quot;color: #336699; overflow: auto;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;#! &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;/ Usr / bin / python
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă calea de acces la sistemul&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;binar&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;python&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;din sistemul dvs. este diferită, modificați acea linie, lăsând primele două caractere (&amp;nbsp;&lt;/span&gt;&lt;b&gt;#!&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;) Intacte.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Asigurați-vă că această linie este cu adevărat prima linie din scenariul dvs., nu doar prima linie ne-goală - vă va salva o mulțime de frustrare.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Utilizați&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;bold&quot;&gt;&lt;b&gt;chmod&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;pentru a seta permisiunile fișierelor pe scriptul dvs. pentru a deveni executabil.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă scriptul este pentru tine singur, tastați&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;chmod 0700&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;scriptfilename&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/i&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.py&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;dacă doriți să îl partajați cu alții din grupul dvs., dar nu lăsați-l să-l editeze, utilizați&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;0750&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;ca valoare chmod;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;dacă doriți să acordați acces tuturor celorlalți, utilizați valoarea&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;0755&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pentru ajutor cu comanda chmod, tastați&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;chmod om&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;simplesect&quot; lang=&quot;en&quot; style=&quot;background-color: white; font-family: Georgia, serif;&quot;&gt;
&lt;div class=&quot;titlepage&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/null&quot; name=&quot;N0xa50890.0xb454b8&quot; style=&quot;color: #003366; font-weight: bold;&quot;&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Citirea opțiunilor și a argumentelor liniei de comandă&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Opțiunile și argumentele din linia de comandă vin la îndemână atunci când dorim să le spunem script-urilor noastre cum să se comporte sau să transmită anumite argumente (nume de fișiere, nume de directoare, nume de utilizatori etc.).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Toate programele pot citi aceste opțiuni și argumente dacă doresc, iar scripturile dvs. Python nu diferă.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Implementarea handler-ilor adecvați se reduce la citirea&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;listei&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;argv&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și verificarea opțiunilor și argumentelor pe care doriți să le recunoască scriptul.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Există câteva moduri de a face acest lucru.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Listarea 1 este o opțiune de tratare a opțiunilor simple, care recunoaște opțiunile comune -h, -help și -help, iar când acestea sunt găsite, aceasta se termină imediat după afișarea mesajului de ajutor.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.linuxjournal.com/files/linuxjournal.com/linuxjournal/articles/039/3946/3946l1.html&quot; style=&quot;color: #003366; font-weight: bold; text-decoration-line: none;&quot;&gt;Listarea 1&lt;/a&gt;&lt;br /&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Copiați și salvați acest script ca help.py, faceți-l executabil cu&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;comanda&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;help.py chmod 0755&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și executați-l de mai multe ori, specificând diferite opțiuni, ambele recunoscute de manipulator și nu;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;de exemplu, cu una dintre opțiuni, veți vedea acest mesaj:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;./help.py -h&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;sau&amp;nbsp;&lt;/span&gt;&lt;b&gt;./help.py -o&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă managerul de opțiuni recunoaște una dintre opțiuni, veți vedea acest mesaj:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;programlisting&quot; style=&quot;color: #336699; overflow: auto;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;help.py-nu face nimic util (încă)&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
opțiuni: -h, -help sau -help-afișează acest ajutor&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
Drepturi de autor (c) Jacek Artymiak, 2000&lt;/span&gt;
&lt;/pre&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă invocați&amp;nbsp;&lt;/span&gt;&lt;b&gt;help.py&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;cu o opțiune pe care nu o recunoaște sau fără nicio opțiune, acesta va afișa mesajul &quot;Nu recunosc această opțiune&quot;.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Rețineți că trebuie să&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;bold&quot;&gt;&lt;b&gt;importem&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;modulul&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;bold&quot;&gt;&lt;b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sys&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;înainte de a putea verifica conținutul&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;listei&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;argv&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și înainte de a putea apela&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;funcția de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;bold&quot;&gt;&lt;b&gt;ieșire&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Instrucțiunea&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;bold&quot;&gt;&lt;b&gt;sys.exit&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este o caracteristică de siguranță care împiedică executarea ulterioară a programului atunci când una dintre opțiunile de ajutor este găsită în interiorul&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;listei&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;argv&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest lucru asigură că utilizatorii nu fac ceva periculos înainte de a citi mesajele de ajutor (pentru care nu ar avea nevoie altfel).&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Modulul simplu de manipulare a opțiunilor de ajutor descris mai sus funcționează destul de bine și puteți să îl duplicați și să îl modificați pentru a recunoaște opțiunile suplimentare, dar aceasta nu este cea mai eficientă modalitate de a recunoaște mai multe opțiuni cu sau fără argumente.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Modul &quot;potrivit&quot; de a face acest lucru este de a folosi&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;modulul&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;bold&quot;&gt;&lt;b&gt;getopt&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, care convertește opțiunile și argumentele într-o listă drăguță de tupluri.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Lista 2 arată cum funcționează.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.linuxjournal.com/files/linuxjournal.com/linuxjournal/articles/039/3946/3946l2.html&quot; style=&quot;color: #003366; font-weight: bold; text-decoration-line: none;&quot;&gt;Listing 2&lt;/a&gt;&lt;br /&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Copiați acest script, salvați-l ca options.py și faceți-l executabil.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;După cum puteți vedea, utilizează două module: sys și getopt care sunt importate chiar la început.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Apoi definim o funcție simplă care afișează mesajul de ajutor atunci când ceva nu merge bine.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Procesarea efectivă a argumentelor liniei de comandă începe cu&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;instrucțiunea&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;try&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, unde testează lista opțiunilor și argumentelor din linia de comandă (sys.argv) pentru erorile definite ca opțiuni necunoscute sau argumente lipsă;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;în cazul în&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;care sunt detectate, script -&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;ul va afișa un mesaj de&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;eroare și de&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;ieșire imediat ( a se&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;vedea în&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;afara cazului&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;de grup declarație).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Atunci când nu s-au detectat erori, scriptul nostru împarte lista opțiunilor și argumentele lor în tuple din&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;lista de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;opțiuni&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și începe să le parseze executând o serie de bucle, fiecare căutând o opțiune și argumentele așteptate.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Funcția&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;bold&quot;&gt;&lt;b&gt;getopt.getopt&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;generează două liste în scriptul nostru de mostre:&amp;nbsp;&lt;/span&gt;&lt;b&gt;opțiuni&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;care conțin opțiuni și argumentele acestora;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;și&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;xargumente&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;care conțin argumente care nu sunt legate de niciuna dintre opțiuni.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Putem ignora în siguranță în cele mai multe cazuri.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pentru a recunoaște&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;opțiunile&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;scurte (cu o singură literă precum&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;-h&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;) și long (cu cele prefixate cu&amp;nbsp;&lt;/span&gt;&lt;b&gt;-&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;), getopt.getopt utilizează două argumente separate.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Lista opțiunilor scurte conține toate listate într-un singur șir, de exemplu,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;getopt.getopt (sys.argv, &#39;ahoinmdwq&#39;)&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Este posibil să specificăm în șirul respectiv opțiunile care necesită absolut un argument pentru a le urma imediat (de exemplu,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;-v&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;nume fișier&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/i&gt;&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;) sau după un spațiu (de exemplu,&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;-v&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;nume de fișier&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/i&gt;&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest lucru se face prin inserarea două puncte (&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;:&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;) dupa optiunea, ca aceasta:&amp;nbsp;&lt;/span&gt;&lt;b&gt;getopt.getopt (sys.argv, „ahoiv: emwn“&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Cu toate acestea, aceasta creează o problemă proastă care poate provoca o anumită confuzie și pierde în mod inutil timpul;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;dacă utilizatorul uită să specifice argumentul pentru opțiunea care o cere, opțiunea care urmează îl devine argument.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Luați în considerare acest exemplu:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;programlisting&quot; style=&quot;color: #336699; overflow: auto;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;script.py -v -h
&lt;/span&gt;&lt;/pre&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă ați pus&amp;nbsp;&lt;/span&gt;&lt;b&gt;v:&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;în argumentul șirului opțional scurt al funcției getopt.getopt, opțiunea&amp;nbsp;&lt;/span&gt;&lt;b&gt;-h&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;va fi tratată ca argumentul opțiunii&amp;nbsp;&lt;/span&gt;&lt;b&gt;-v&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Aceasta este o problemă și face parsarea listei de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;emphasis&quot;&gt;&lt;em&gt;opțiuni&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;tuple&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;emphasis&quot;&gt;&lt;em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;, argument&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;mult mai dificil.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Soluția la această problemă este simplă: nu folosiți colonul, ci verificați cel de-al doilea element al tuplei care conține opțiunea (primul element al tuplei analizate) care necesită un argument.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă este gol, raportați o eroare, cum ar fi&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;opțiunea&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;-a&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;opțiunea de manipulare.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Opțiunile lungi prefixate cu&amp;nbsp;&lt;/span&gt;&lt;b&gt;-&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;trebuie să fie listate ca un argument separat pentru getopt.getopt, de exemplu,&amp;nbsp;&lt;/span&gt;&lt;b&gt;getopt.getopt (sys.argv, &#39;ah&#39;, [&#39;view&#39;, &#39;file =&#39;])&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acestea pot fi întreținute de același manipulant ca opțiunile scurte.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Ce faceți după ce localizați opțiunile oferite de utilizator depinde de dvs.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Listarea 2 poate fi utilizată ca șablon pentru scripturile dvs.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;simplesect&quot; lang=&quot;en&quot; style=&quot;background-color: white; font-family: Georgia, serif;&quot;&gt;
&lt;a href=&quot;http://www.linuxjournal.com/files/linuxjournal.com/linuxjournal/articles/039/3946/3946l3.html&quot; style=&quot;color: #003366; font-weight: bold; text-decoration-line: none;&quot;&gt;Listarea 3&lt;/a&gt;&lt;br /&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Funcția care ne permite să capturam semnale este&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;bold&quot;&gt;&lt;b&gt;signal.signal&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Cele două argumente sunt numărul semnalului pe care doriți să-l captați și numele dispozitivului de gestionare a semnalului.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Listarea 3 este un script simplu care captează semnalul SIGINT (numerele semnalului are propriile echivalente simbolice) semnalul trimis la el când apăsați&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;CTRL-C&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Semnalul SIGINT nu este singurul pe care îl puteți captura.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă doriți să capturați semnale suplimentare, adăugați mai multe apeluri semnal.signale pentru a le manipula, schimbând numărul semnalului (&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;semnal.SIG&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;xxx&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/i&gt;&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;constant) și numele handlerului (opțional; puteți utiliza același handler cu mai mult de un semnal ).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pentru a vedea ce semnale sunt disponibile în Linux, tastați&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;kill -l&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;pe linia de comandă.&lt;/span&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.linuxjournal.com/files/linuxjournal.com/linuxjournal/articles/039/3946/3946l4.html&quot; style=&quot;color: #003366; font-weight: bold; text-decoration-line: none;&quot;&gt;Listing 4&lt;/a&gt;&lt;br /&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Semnalele pot fi ignorate, ceea ce este util dacă doriți ca unele dintre ele să nu perturbe executarea scriptului.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Lista 4 arată modul în care faceți acest lucru (aveți grijă, acest script nu poate fi oprit cu&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;CTRL-C&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;).&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Un alt semnal care merită să ne amintim este SIGALRM.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Configurarea unui handler pentru semnalul respectiv vă permite să opriți executarea scriptului dvs. după numărul de secunde dat.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest lucru se face cu&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;bold&quot;&gt;&lt;b&gt;signal.alarm&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;așa cum este prezentat în Lista 5.&lt;/span&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.linuxjournal.com/files/linuxjournal.com/linuxjournal/articles/039/3946/3946l5.html&quot; style=&quot;color: #003366; font-weight: bold; text-decoration-line: none;&quot;&gt;Listarea 5&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;simplesect&quot; lang=&quot;en&quot; style=&quot;background-color: white; font-family: Georgia, serif;&quot;&gt;
&lt;div class=&quot;titlepage&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/null&quot; name=&quot;N0xa50890.0xb3d880&quot; style=&quot;color: #003366; font-weight: bold;&quot;&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Lucrul cu fișierele&lt;/span&gt;&lt;/div&gt;
&lt;a href=&quot;http://www.linuxjournal.com/files/linuxjournal.com/linuxjournal/articles/039/3946/3946l6.html&quot; style=&quot;color: #003366; font-weight: bold; text-decoration-line: none;&quot;&gt;Lista 6&lt;/a&gt;&lt;br /&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Multe scripturi trebuie să funcționeze cu fișiere.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Rețineți că înainte de a putea citi sau scrie într-un fișier, acesta trebuie să existe și să fie deschis.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Lista 6 este un exemplu de script care deschide un fișier pentru citire.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Scrierea într-un fișier necesită doar o mică modificare (a se vedea Lista 7).&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.linuxjournal.com/files/linuxjournal.com/linuxjournal/articles/039/3946/3946l7.html&quot; style=&quot;color: #003366; font-weight: bold; text-decoration-line: none;&quot;&gt;Listarea 7&lt;/a&gt;&lt;br /&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;După cum puteți vedea, primul dintre cele două scripturi afișate în listele 6 și 7 nu reușește să deschidă un fișier pentru a citi dacă fișierul nu există.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acesta este un comportament corect.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Al doilea script încearcă să deschidă un fișier pentru scriere: dacă fișierul există, acesta este trunchiat (adică conținutul său este șters);&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;dacă nu există, este creat.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Este posibil să nu fie întotdeauna comportamentul dorit.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Când doriți să adăugați date la sfârșitul unui fișier, ar trebui să îl deschideți pentru scriere, păstrând în același timp conținutul original.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pentru a face acest lucru, schimbați al doilea argument al funcției&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;bold&quot;&gt;&lt;b&gt;deschise de&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;la&amp;nbsp;&lt;/span&gt;&lt;b&gt;&#39;w&#39;&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;la&amp;nbsp;&lt;/span&gt;&lt;b&gt;&#39;a&#39;&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Odată ce fișierul este deschis, îl putem citi sau scrie utilizând următoarele metode:&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;itemizedlist&quot;&gt;
&lt;ul style=&quot;list-style-position: outside;&quot; type=&quot;disc&quot;&gt;
&lt;li&gt;&lt;span class=&quot;bold&quot;&gt;&lt;b&gt;citiți&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;(&lt;/span&gt;&lt;span class=&quot;emphasis&quot;&gt;&lt;em&gt;&amp;nbsp;n&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;): citește cel mult&lt;/span&gt;&lt;span class=&quot;emphasis&quot;&gt;&lt;em&gt;&amp;nbsp;n&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;octeți dintr-un fișier (dacă omiteți numărul de octeți, întreg fișierul va fi citit), de exemplu&amp;nbsp;&lt;/span&gt;&lt;b&gt;fi.read (200)&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, care citește până la 200 octeți.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;bold&quot;&gt;&lt;b&gt;readline&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;: citește câte o linie la un moment dat, de exemplu&lt;/span&gt;&lt;b&gt;&amp;nbsp;fi.readline ()&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;bold&quot;&gt;&lt;b&gt;readlines&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;: citește toate liniile dintr-un fișier, de exemplu&amp;nbsp;&lt;/span&gt;&lt;b&gt;fi.readlines ()&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;bold&quot;&gt;&lt;b&gt;scrie&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;(&lt;/span&gt;&lt;span class=&quot;emphasis&quot;&gt;&lt;em&gt;&amp;nbsp;șir&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;): scrie un&lt;/span&gt;&lt;span class=&quot;emphasis&quot;&gt;&lt;em&gt;&amp;nbsp;șir&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;într-un fișier, de ex.&amp;nbsp;&lt;/span&gt;&lt;b&gt;fo.write (&#39;alabama&#39;)&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;bold&quot;&gt;&lt;b&gt;writelines (&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;emphasis&quot;&gt;&lt;em&gt;list&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;): scrie o&lt;/span&gt;&lt;span class=&quot;emphasis&quot;&gt;&lt;em&gt;&amp;nbsp;listă&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;a șirurilor unui fișier, de ex.,&amp;nbsp;&lt;/span&gt;&lt;b&gt;fo.writelines ([&#39;alaska &amp;lt;\ n&amp;gt;&#39;, &#39;california&#39;, &#39;nevada&#39;&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Când doriți să închideți un fișier, utilizați&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;metoda&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sa de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;bold&quot;&gt;&lt;b&gt;închidere&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, de exemplu,&amp;nbsp;&lt;/span&gt;&lt;b&gt;fo.close ()&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.linuxjournal.com/files/linuxjournal.com/linuxjournal/articles/039/3946/3946l8.html&quot; style=&quot;color: #003366; font-weight: bold; text-decoration-line: none;&quot;&gt;Lista 8&lt;/a&gt;&lt;br /&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă doriți ca scriptul dvs. să creeze fișiere temporare, utilizați&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;modulul&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;bold&quot;&gt;&lt;b&gt;tempfile&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acesta simplifică sarcina de a crea fișiere temporare prin crearea automată a unor nume de fișiere unice pe baza șabloanelor definite în variabilele&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;tempdir&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și&amp;nbsp;&lt;/span&gt;&lt;b&gt;șablon&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Nu creează sau șterge fișiere temporare în sine, dar puteți realiza acest lucru folosind o metodă similară cu cea utilizată în Lista 8.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Rețineți că trebuie să utilizați ambele&amp;nbsp;&lt;/span&gt;&lt;b&gt;simboluri os.O_CREAT&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și&amp;nbsp;&lt;/span&gt;&lt;b&gt;os.RDWR&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;pentru a spune funcției&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;bold&quot;&gt;&lt;b&gt;os.open&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;crearea unui fișier temporar atât pentru citire cât și pentru scriere.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De asemenea, nu uitați să închideți și să eliminați toate fișierele temporare create înainte de a părăsi un script.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Veți găsi mai multe informații despre funcțiile, constantele și variabilele utilizate în exemplul respectiv în secțiunile os, posix și tempfile din&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;emphasis&quot;&gt;&lt;em&gt;Manualul de Referință al Bibliotecii Python&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.linuxjournal.com/files/linuxjournal.com/linuxjournal/articles/039/3946/3946l9.html&quot; style=&quot;color: #003366; font-weight: bold; text-decoration-line: none;&quot;&gt;Listing 9&lt;/a&gt;&lt;br /&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Este o idee bună să implementați un singur handler care va elimina fișierele temporare înainte de a ieși din script, ca în Lista 9.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span face=&quot;&amp;quot;arial&amp;quot; , sans-serif&quot; style=&quot;background-color: #eeeeee; font-size: 12.8px; vertical-align: inherit;&quot;&gt;&lt;br class=&quot;Apple-interchange-newline&quot; /&gt;Nu există nici măcar o comparație între Windows și Linux atunci când vine vorba de programare.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span face=&quot;&amp;quot;arial&amp;quot; , sans-serif&quot; style=&quot;background-color: #eeeeee; font-size: 12.8px; vertical-align: inherit;&quot;&gt;Linux este mult mai bun.&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;&amp;quot;arial&amp;quot; , sans-serif&quot; style=&quot;background-color: #eeeeee; font-size: 12.8px; vertical-align: inherit;&quot;&gt;Toți cei care au multe cunoștințe despre acest subiect știu acest lucru.&lt;/span&gt;&lt;br /&gt;
&lt;span face=&quot;&amp;quot;arial&amp;quot; , sans-serif&quot; style=&quot;background-color: #eeeeee; font-size: 12.8px; vertical-align: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span face=&quot;&amp;quot;arial&amp;quot; , sans-serif&quot; style=&quot;background-color: #eeeeee; font-size: 12.8px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 12.8px; vertical-align: inherit;&quot;&gt;Python are seturi de instrumente excelente (Gtk, wx, Qt), designeri GUI și IDE-uri vizuale și biblioteci uriașe.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 12.8px; vertical-align: inherit;&quot;&gt;Este atât de bun încât multe aplicații Windows sunt scrise în el și mulți oameni aleg Linux deoarece scripturile sunt atât de sărace pe Windows.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 12.8px; vertical-align: inherit;&quot;&gt;Dacă doriți ceva orientat mai mult spre scripting, aveți Tcl / Tk, Expect, Bash și Perl.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 12.8px; vertical-align: inherit;&quot;&gt;În loc de HTA, primiți Firefox și xulrunner (în funcție de ce nivel de control doriți).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 12.8px; vertical-align: inherit;&quot;&gt;Toate acestea sunt documentate copios.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 12.8px; vertical-align: inherit;&quot;&gt;AutoHotkey, Autoit și RapidBatch nu se apropie nici măcar, iar Windows este relativ slab când vine vorba de scripting.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span face=&quot;&amp;quot;arial&amp;quot; , sans-serif&quot; style=&quot;background-color: #eeeeee; font-size: 12.8px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 12.8px; vertical-align: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: white; font-family: Arial, sans-serif; font-size: 12.8px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;M-am uitat la o serie de limbi de programare și scripting târziu.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;A venit peste &quot;Titanium&quot;, care este o solutie cross-platform pentru Windows, Linux, OSX precum si iPhone si Android.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Este capabil să lucreze cu JS, Python, PHP și o serie de alte softTech.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span face=&quot;&amp;quot;arial&amp;quot; , sans-serif&quot; style=&quot;background-color: #eeeeee; font-size: 12.8px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 12.8px; vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;background-color: white; font-family: Arial, sans-serif; font-size: 12.8px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Mai multe informații aici:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;a href=&quot;http://en.wikipedia.org/wiki/Appcelerator_Titanium&quot; style=&quot;color: #003366; text-decoration-line: none;&quot; title=&quot;http://en.wikipedia.org/wiki/Appcelerator_Titanium&quot;&gt;http://en.wikipedia.org/wiki/Appcelerator_Titanium&amp;nbsp;&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.appcelerator.com/products/&quot; style=&quot;color: #003366; text-decoration-line: none;&quot; title=&quot;http://www.appcelerator.com/products/&quot;&gt;http://www.appcelerator.com/products/&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: Arial, sans-serif; font-size: 12.8px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: Arial, sans-serif; font-size: 12.8px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Există multe exemple de cod simplu aici ...&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: Arial, sans-serif; font-size: 12.8px;&quot;&gt;
&lt;a href=&quot;http://www.java2s.com/Code/Python/CatalogPython.htm&quot; style=&quot;color: #003366; text-decoration-line: none;&quot; title=&quot;http://www.java2s.com/Code/Python/CatalogPython.htm&quot;&gt;http://www.java2s.com/Code/Python/CatalogPython.htm&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: Arial, sans-serif; font-size: 12.8px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;ceva mai complexe exemple de cod, și nu atât de inutile, așa cum sugerează titlul aici ...&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: Arial, sans-serif; font-size: 12.8px;&quot;&gt;
&lt;a href=&quot;http://www.uselesspython.com/&quot; style=&quot;color: #003366;&quot; title=&quot;http://www.uselesspython.com/&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;http://www.uselesspython.com/&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: Arial, sans-serif; font-size: 12.8px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;atunci este cartea de bucate ...&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: Arial, sans-serif; font-size: 12.8px;&quot;&gt;
&lt;a href=&quot;http://aspn.activestate.com/ASPN/Cookbook/Python/&quot; style=&quot;color: #003366; text-decoration-line: none;&quot; title=&quot;http://aspn.activestate.com/ASPN/Cookbook/Python/&quot;&gt;http://aspn.activestate.com/ASPN/Cookbook/Python/&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: Arial, sans-serif; font-size: 12.8px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;și trezile lui Parnass ...&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: Arial, sans-serif; font-size: 12.8px;&quot;&gt;
&lt;a href=&quot;http://py.vaults.ca/apyllo.py&quot; style=&quot;color: #003366; text-decoration-line: none;&quot; title=&quot;http://py.vaults.ca/apyllo.py&quot;&gt;http://py.vaults.ca/apyllo.py&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: Arial, sans-serif; font-size: 12.8px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;care ar trebui să țină ypu ocupat pentru o vreme.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;background-color: #eeeeee; font-family: Arial, sans-serif; font-size: 12.8px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;code style=&quot;color: #336699;&quot;&gt;decimal_number = 0&lt;br /&gt;st_binary_number = &quot;1000111&quot;&lt;/code&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #eeeeee; font-family: Arial, sans-serif; font-size: 12.8px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;n = 1 (n =&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;1)&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pentru i în intervalul (n):&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;dacă (numărul st_binary [i] == &#39;1&#39;):&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;decimal_number + = pwr&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pwr = pwr &amp;gt;&amp;gt; 1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #eeeeee; font-family: Arial, sans-serif; font-size: 12.8px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;imprimați numărul zecimal&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
&lt;/span&gt;
&lt;div style=&quot;background-color: #eeeeee; font-family: Arial, sans-serif; font-size: 12.8px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;convertește binarul &quot;1000111&quot; în zecimal 71;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: white; font-family: Arial, sans-serif; font-size: 12.8px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;binary_number = &quot;1000111&quot;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;decimal_number = int (numărul binar, 2)&lt;/span&gt;&lt;/div&gt;
&lt;span face=&quot;&amp;quot;arial&amp;quot; , sans-serif&quot; style=&quot;background-color: white; font-size: 12.8px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;background-color: white; font-family: Arial, sans-serif; font-size: 12.8px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;print decimal_number # Imprimă 71&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: Arial, sans-serif; font-size: 12.8px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: Arial, sans-serif; font-size: 12.8px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;background-color: #eeeeee; font-size: 12.8px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;print a, &#39;=&#39;, os.environ. [a]&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br style=&quot;background-color: #eeeeee; font-size: 12.8px;&quot; /&gt;&lt;span style=&quot;background-color: #eeeeee; font-size: 12.8px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;ar trebui să fie&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br style=&quot;background-color: #eeeeee; font-size: 12.8px;&quot; /&gt;&lt;span style=&quot;background-color: #eeeeee; font-size: 12.8px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;imprimate a, &#39;=&#39;, os.environ [a]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: Arial, sans-serif; font-size: 12.8px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;background-color: #eeeeee; font-size: 12.8px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: Arial, sans-serif; font-size: 12.8px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;background-color: #eeeeee; font-size: 12.8px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span face=&quot;&amp;quot;arial&amp;quot; , sans-serif&quot; style=&quot;background-color: white; font-size: 12.8px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span face=&quot;&amp;quot;arial&amp;quot; , sans-serif&quot; style=&quot;background-color: white; font-size: 12.8px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span face=&quot;&amp;quot;arial&amp;quot; , sans-serif&quot; style=&quot;background-color: white; font-size: 12.8px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span face=&quot;&amp;quot;arial&amp;quot; , sans-serif&quot; style=&quot;background-color: white; font-size: 12.8px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Exemplu de folosire a argumentelor de comandă:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span face=&quot;&amp;quot;arial&amp;quot; , sans-serif&quot; style=&quot;background-color: white; font-size: 12.8px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;user @ host $ script.py arg1 arg2&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;code style=&quot;background-color: white; color: #336699;&quot;&gt;&lt;br /&gt;import sys&lt;br /&gt;var = sys.argv [2]&lt;br /&gt;print var&lt;br /&gt;#will print arg2&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://www.blogger.com/goog_1626242576&quot;&gt;&lt;br /&gt;&lt;/a&gt;
&lt;a href=&quot;http://www.linuxjournal.com/article/3946&quot;&gt;http://www.linuxjournal.com/article/3946&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h4 style=&quot;background-color: white; border: 0px; color: #161616; font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 22px; margin: 25px 0px 15px; padding: 0px; text-transform: uppercase; vertical-align: baseline;&quot;&gt;
&lt;em style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;MODIFICAREA SETĂRILOR COOKIE-URILOR&lt;/em&gt;&lt;/h4&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #343434; font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: inherit; margin-bottom: 10px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Rețineți că browserele de internet vă permit să modificați setările cookie-urilor.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Aceste setări sunt de obicei găsite în meniul &quot;opțiuni&quot; sau &quot;preferințe&quot; al browserului dvs. de internet.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pentru a înțelege aceste setări, următoarele link-uri ar putea fi de ajutor.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În caz contrar, trebuie să utilizați opțiunea &quot;Ajutor&quot; în browserul dvs. de internet pentru mai multe detalii.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;ul style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #343434; font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; list-style: none; margin: 10px 0px 15px; padding: 0px 0px 0px 20px; vertical-align: baseline;&quot;&gt;
&lt;li style=&quot;border: 0px; margin: 0px 0px 5px; padding: 0px 0px 0px 10px; position: relative; vertical-align: baseline;&quot;&gt;&lt;a href=&quot;http://support.microsoft.com/kb/196955&quot; style=&quot;border: 0px; color: #18a3fa; margin: 0px; padding: 0px; text-decoration-line: none; vertical-align: baseline;&quot;&gt;Setările cookie în Internet Explorer&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;border: 0px; margin: 0px 0px 5px; padding: 0px 0px 0px 10px; position: relative; vertical-align: baseline;&quot;&gt;&lt;a href=&quot;http://support.mozilla.org/en-US/kb/cookies-information-websites-store-on-your-computer?redirectlocale=en-US&amp;amp;redirectslug=Cookies&quot; style=&quot;border: 0px; color: #18a3fa; margin: 0px; padding: 0px; text-decoration-line: none; vertical-align: baseline;&quot;&gt;Setările cookie-urilor în Firefox&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;border: 0px; margin: 0px 0px 5px; padding: 0px 0px 0px 10px; position: relative; vertical-align: baseline;&quot;&gt;&lt;a href=&quot;http://support.google.com/chrome/bin/answer.py?hl=en&amp;amp;answer=95647&quot; style=&quot;border: 0px; color: #18a3fa; margin: 0px; padding: 0px; text-decoration-line: none; vertical-align: baseline;&quot;&gt;Setările de cookie în Chrome&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;border: 0px; margin: 0px 0px 5px; padding: 0px 0px 0px 10px; position: relative; vertical-align: baseline;&quot;&gt;&lt;a href=&quot;http://support.apple.com/kb/HT1677&quot; style=&quot;border: 0px; color: #18a3fa; margin: 0px; padding: 0px; text-decoration-line: none; vertical-align: baseline;&quot;&gt;Setările cookie din Safari&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #343434; font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: inherit; margin-bottom: 10px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;ookie-urile&lt;/span&gt;&lt;span style=&quot;border: 0px; font-size: inherit; font-weight: 700; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;em style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;&quot;strict necesare&quot;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;vă permit să vă deplasați pe site și să utilizați funcții esențiale cum ar fi zonele securizate.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Fără aceste cookie-uri, nu putem furniza serviciile solicitate.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Utilizăm aceste cookie-uri Strictly Necessary pentru a:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;ul style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #343434; font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; list-style: none; margin: 10px 0px 15px; padding: 0px 0px 0px 20px; vertical-align: baseline;&quot;&gt;
&lt;li style=&quot;border: 0px; margin: 0px 0px 5px; padding: 0px 0px 0px 10px; position: relative; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Identificați-vă că sunteți conectat (ă) la site-ul nostru și că vă autentificați&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border: 0px; margin: 0px 0px 5px; padding: 0px 0px 0px 10px; position: relative; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Asigurați-vă că vă conectați la serviciul potrivit pe site-ul nostru atunci când facem orice schimbări în modul în care funcționează site-ul Web&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border: 0px; margin: 0px 0px 5px; padding: 0px 0px 0px 10px; position: relative; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Din motive de securitate&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #343434; font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: inherit; margin-bottom: 10px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acceptarea acestor cookie-uri este o condiție de utilizare a site-ului, astfel încât, dacă împiedicați aceste cookie-uri, nu putem garanta modul în care Website-ul sau securitatea pe site-ul nostru va fi efectuată în timpul vizitei.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #343434; font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: inherit; margin-bottom: 10px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; font-size: inherit; font-weight: 700; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;em style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Cookie&lt;/span&gt;&lt;span style=&quot;border: 0px; font-size: inherit; font-weight: 700; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;em style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;-&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;urile&lt;/span&gt;&lt;span style=&quot;border: 0px; font-size: inherit; font-weight: 700; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;em style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;&quot;Performanță&quot;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;colectează informații despre modul în care utilizați site-ul nostru, de exemplu, paginile pe care le accesați și dacă întâmpinați erori.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Aceste cookie-uri nu colectează nicio informație care să vă poată identifica și sunt utilizate numai pentru a ne ajuta să îmbunătățim funcționarea site-ului nostru, să înțelegem ce interesează utilizatorii noștri și să evalueze eficiența publicității noastre.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Utilizăm cookie-urile de performanță pentru:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;ul style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #343434; font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; list-style: none; margin: 10px 0px 15px; padding: 0px 0px 0px 20px; vertical-align: baseline;&quot;&gt;
&lt;li style=&quot;border: 0px; margin: 0px 0px 5px; padding: 0px 0px 0px 10px; position: relative; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Realizați analize web: furnizați statistici privind utilizarea site-ului nostru web&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border: 0px; margin: 0px 0px 5px; padding: 0px 0px 0px 10px; position: relative; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Obțineți date despre numărul de utilizatori ai site-ului care au vizualizat un produs&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border: 0px; margin: 0px 0px 5px; padding: 0px 0px 0px 10px; position: relative; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Ajutați-ne să îmbunătățim website-ul prin măsurarea oricăror erori care apar&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border: 0px; margin: 0px 0px 5px; padding: 0px 0px 0px 10px; position: relative; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Testați diferite modele pentru site-ul Web&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #343434; font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: inherit; margin-bottom: 10px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Unele dintre cookie-urile noastre de performanță sunt gestionate de noi de către terțe părți.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Nu permitem părții terțe să utilizeze cookie-urile în alte scopuri decât cele enumerate mai sus.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #343434; font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: inherit; margin-bottom: 10px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Prin utilizarea site-ului nostru sau prin exprimarea consimțământului dvs. conform altor dispoziții legale aplicabile, acceptați utilizarea cookie-urilor &quot;Performanță&quot;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă preveniți cookie-urile, nu putem garanta modul în care site-ul nostru va funcționa pentru dvs.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #343434; font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: inherit; margin-bottom: 10px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; font-size: inherit; font-weight: 700; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;em style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Cookie-urile &quot;funcționale&quot;&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;sunt utilizate pentru a furniza servicii sau a vă aminti setările pentru a vă îmbunătăți vizita.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Utilizăm cookie-urile &quot;funcțional&quot; în scopuri precum:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;ul style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #343434; font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; list-style: none; margin: 10px 0px 15px; padding: 0px 0px 0px 20px; vertical-align: baseline;&quot;&gt;
&lt;li style=&quot;border: 0px; margin: 0px 0px 5px; padding: 0px 0px 0px 10px; position: relative; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Amintiți-vă setările pe care le-ați aplicat, cum ar fi aspectul, dimensiunea textului, limba, preferințele și culorile&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border: 0px; margin: 0px 0px 5px; padding: 0px 0px 0px 10px; position: relative; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Amintiți-vă dacă v-am întrebat deja dacă doriți să completați un sondaj&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border: 0px; margin: 0px 0px 5px; padding: 0px 0px 0px 10px; position: relative; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Amintiți-vă dacă ați angajat cu o anumită componentă sau o listă de produse pe site-ul web, astfel încât să nu-l afișați din nou&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border: 0px; margin: 0px 0px 5px; padding: 0px 0px 0px 10px; position: relative; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Afișați-vă când sunteți conectat (ă) la site-ul Web&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border: 0px; margin: 0px 0px 5px; padding: 0px 0px 0px 10px; position: relative; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pentru a furniza și a afișa conținut video încorporat&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #343434; font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: inherit; margin-bottom: 10px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Unele dintre aceste cookie-uri sunt gestionate pentru noi de către terțe părți.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Nu permitem părții terțe să utilizeze cookie-urile în alte scopuri decât cele enumerate mai sus.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #343434; font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: inherit; margin-bottom: 10px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; font-size: inherit; font-weight: 700; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;em style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Cookie-urile &quot;vizate&quot;&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;sunt utilizate pentru a urmări vizita dvs. pe site-ul Web și pe alte site-uri web, inclusiv paginile pe care le-ați vizitat și legăturile pe care le-ați urmat, ceea ce permite terților să afișeze anunțuri direcționate pe site-urile pe care le vizitați.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #343434; font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: inherit; margin-bottom: 10px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Noi și furnizorii noștri de servicii terțe folosim&amp;nbsp;&lt;/span&gt;&lt;em style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;cookie-uri de direcționare&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;către:&lt;/span&gt;&lt;/div&gt;
&lt;ul style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #343434; font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; list-style: none; margin: 10px 0px 15px; padding: 0px 0px 0px 20px; vertical-align: baseline;&quot;&gt;
&lt;li style=&quot;border: 0px; margin: 0px 0px 5px; padding: 0px 0px 0px 10px; position: relative; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Legătura cu rețelele sociale, cum ar fi Facebook, care ulterior pot utiliza informații despre vizita dvs. pe site-ul nostru, pentru a oferi publicitate sau alte oferte care ar putea fi de interes pentru dvs. atunci când vizitați alte site-uri web.&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border: 0px; margin: 0px 0px 5px; padding: 0px 0px 0px 10px; position: relative; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Oferiți terților informații cu privire la vizita dvs., astfel încât să vă poată prezenta anunțuri sau alte oferte care ar putea fi de interes pentru dvs.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #343434; font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: inherit; margin-bottom: 10px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă vă aflați în UE, puteți renunța la anumite cookie-uri terță parte pe care noi și alte site-uri web le putem utiliza pentru direcționare prin&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://www.youronlinechoices.eu/&quot; style=&quot;border: 0px; color: #18a3fa; margin: 0px; padding: 0px; text-decoration-line: none; vertical-align: baseline;&quot;&gt;http://www.youronlinechoices.eu&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;sau&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://www.aboutads.info/&quot; style=&quot;border: 0px; color: #18a3fa; margin: 0px; padding: 0px; text-decoration-line: none; vertical-align: baseline;&quot;&gt;www.aboutads.info&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă renunțați la una sau mai multe rețele publicitare, înseamnă că acești membri nu vor mai oferi conținut sau anunțuri vizate.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Nu înseamnă că nu veți mai primi niciun conținut sau anunțuri direcționate pe site-urile noastre sau pe alte site-uri terțe.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă browserul dvs. este configurat să respingă cookie-urile când vizitați una dintre paginile&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;de renunțare menționate mai sus și mai târziu ștergeți cookie-urile, utilizați un computer diferit sau modificați browserele Web, este posibil ca preferința dvs. să nu mai fie activă.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Întrucât toate aceste module cookie sunt gestionate de terțe părți, trebuie să consultați notificările și politicile de confidențialitate ale site-urilor terțe pentru informații suplimentare (mai jos, pentru mai multe informații despre cookie-urile direcționate utilizate pe site-ul nostru).&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #343434; font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: inherit; margin-bottom: 10px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Utilizatorii din Statele Unite pot renunța la mai multe rețele publicitare terțe.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu, puteți merge la&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a href=&quot;http://www.aboutads.info/choices/&quot; style=&quot;border: 0px; color: #18a3fa; margin: 0px; padding: 0px; text-decoration-line: none; vertical-align: baseline;&quot;&gt;pagina de alegere a consumatorilor&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;digitală (&quot;DAA&quot;)&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pentru informații despre renunțarea la publicitatea bazată pe categorii de interese și alegerile acestora privind informațiile utilizate de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a href=&quot;http://www.aboutads.info/participating/&quot; style=&quot;border: 0px; color: #18a3fa; margin: 0px; padding: 0px; text-decoration-line: none; vertical-align: baseline;&quot;&gt;companiile DAA&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De asemenea, puteți accesa pagina de oprire a&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a href=&quot;http://www.networkadvertising.org/choices/&quot; style=&quot;border: 0px; color: #18a3fa; margin: 0px; padding: 0px; text-decoration-line: none; vertical-align: baseline;&quot;&gt;consumatorilor&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;pentru inițiativa Network Advertising Initiative (&quot;NAI&quot;)&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pentru informații despre renunțarea la publicitatea bazată pe categorii de interese și alegerile acestora privind informațiile utilizate de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a href=&quot;http://www.networkadvertising.org/participating-networks&quot; style=&quot;border: 0px; color: #18a3fa; margin: 0px; padding: 0px; text-decoration-line: none; vertical-align: baseline;&quot;&gt;membrii NAI&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #343434; font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: inherit; margin-bottom: 10px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă renunțați la una sau mai multe companii listate pe pagina de&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://www.aboutads.info/choices/&quot; style=&quot;border: 0px; color: #18a3fa; margin: 0px; padding: 0px; text-decoration-line: none; vertical-align: baseline;&quot;&gt;alegere a consumatorilor&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;DAA&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sau pe pagina de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a href=&quot;http://www.networkadvertising.org/choices/&quot; style=&quot;border: 0px; color: #18a3fa; margin: 0px; padding: 0px; text-decoration-line: none; vertical-align: baseline;&quot;&gt;renunțare la consumatori a&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;NAI,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;veți renunța la furnizarea de conținuturi sau anunțuri de către acele companii, dar nu înseamnă că nu veți mai fi primiți orice publicitate prin intermediul site-ului nostru sau pe alte site-uri web.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Puteți continua să primiți reclame, de exemplu, pe baza site-ului web pe care îl vizualizați (adică anunțuri bazate pe contextual).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De asemenea, în cazul în care browserele dvs. sunt configurate pentru a respinge cookie-urile atunci când renunțați la site-urile DAA sau NAI, opțiunea de excludere este posibil să nu fie eficientă.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Informații suplimentare sunt disponibile pe site-ul web al DAA la&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a href=&quot;http://www.aboutads.info/&quot; style=&quot;border: 0px; color: #18a3fa; margin: 0px; padding: 0px; text-decoration-line: none; vertical-align: baseline;&quot;&gt;www.aboutads.info&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sau pe site-ul web al NAI la&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://www.networkadvertising.org/&quot; style=&quot;border: 0px; color: #18a3fa; margin: 0px; padding: 0px; text-decoration-line: none; vertical-align: baseline;&quot;&gt;www.networkadvertising.org&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;h4 style=&quot;background-color: white; border: 0px; color: #161616; font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 22px; margin: 25px 0px 15px; padding: 0px; text-transform: uppercase; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;MAI MULTE INFORMAȚII DESPRE COOKIE-URI&lt;/span&gt;&lt;/h4&gt;
&lt;h4 style=&quot;background-color: white; border: 0px; color: #161616; font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 22px; margin: 25px 0px 15px; padding: 0px; text-transform: uppercase; vertical-align: baseline;&quot;&gt;
&lt;em style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;TOTUL DESPRE COOKIE-URI&lt;/em&gt;&lt;/h4&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #343434; font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: inherit; margin-bottom: 10px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Informații utile despre modulele cookie pot fi găsite la adresa:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #343434; font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: inherit; margin-bottom: 10px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;a href=&quot;http://www.allaboutcookies.org/&quot; style=&quot;border: 0px; color: #18a3fa; margin: 0px; padding: 0px; text-decoration-line: none; vertical-align: baseline;&quot;&gt;http://www.allaboutcookies.org/&lt;/a&gt;&lt;/div&gt;
&lt;h4 style=&quot;background-color: white; border: 0px; color: #161616; font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 22px; margin: 25px 0px 15px; padding: 0px; text-transform: uppercase; vertical-align: baseline;&quot;&gt;
&lt;em style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;BIROUL DE PUBLICITATE PE INTERNET&lt;/em&gt;&lt;/h4&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #343434; font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: inherit; margin-bottom: 10px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Un ghid de publicitate comportamentală și de confidențialitate online a fost produs de industria de publicitate pe internet, care poate fi găsit la adresa:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #343434; font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: inherit; margin-bottom: 10px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;a href=&quot;http://www.youronlinechoices.eu/&quot; style=&quot;border: 0px; color: #18a3fa; margin: 0px; padding: 0px; text-decoration-line: none; vertical-align: baseline;&quot;&gt;http://www.youronlinechoices.eu/&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; color: #161616; font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, Helvetica, Arial, sans-serif; font-size: 36px; letter-spacing: -0.5px; line-height: 45px; margin: 30px 0px 20px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span id=&quot;location-information&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Localizarea informațiilor dvs.&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #343434; font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: inherit; margin-bottom: 10px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Orice servere sau servicii care conțin informații de identificare personală se află în UE.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pentru YouTrack InCloud, oferim clienților noștri posibilitatea de a alege între găzduirea instanței lor în UE sau în SUA.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Uneori, JetBrains poate procesa sau transfera unele dintre datele personale (cum ar fi numele și adresa de e-mail) către companiile afiliate din afara UE.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Orice astfel de transfer se va face în conformitate cu legile aplicabile privind protecția datelor și cu politica de confidențialitate.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Prin transmiterea oricăror informații personale sau prin utilizarea site-ului web, sunteți de acord cu acest transfer și cu prelucrarea datelor dvs. personale în afara UE.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ul style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #343434; font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; list-style: none; margin: 10px 0px 15px; padding: 0px 0px 0px 20px; vertical-align: baseline;&quot;&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;a href=&quot;https://www.jetbrains.com/company/privacy.html#using-website&quot;&gt;https://www.jetbrains.com/company/privacy.html#using-website&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;a href=&quot;https://www.jetbrains.com/pycharm/specials/pycharm/pycharm.html?gclid=Cj0KCQiAv_HSBRCkARIsAGaSsrBIuiUr3--GA_PoU5MltPwt_hvI2oQIs86V1VjKOtPrEqG1rIFcu00aAojnEALw_wcB&amp;amp;gclsrc=aw.ds.ds&amp;amp;dclid=CMCPwcb-2tgCFYGYdwodfW0ADQ&quot;&gt;TOATE INSTRUMENTELE PYTHON&amp;nbsp;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;a href=&quot;https://www.jetbrains.com/pycharm/specials/pycharm/pycharm.html?gclid=Cj0KCQiAv_HSBRCkARIsAGaSsrBIuiUr3--GA_PoU5MltPwt_hvI2oQIs86V1VjKOtPrEqG1rIFcu00aAojnEALw_wcB&amp;amp;gclsrc=aw.ds.ds&amp;amp;dclid=CMCPwcb-2tgCFYGYdwodfW0ADQ&quot;&gt;ÎNTR-UN SINGUR LOC&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span face=&quot;&amp;quot;gotham ssm a&amp;quot; , &amp;quot;gotham ssm b&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif&quot; style=&quot;background-color: #eaeaec; color: dimgrey; font-size: 16px; vertical-align: inherit;&quot;&gt;Economisiți timp în timp ce PyCharm se ocupă de rutină.&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;&amp;quot;gotham ssm a&amp;quot; , &amp;quot;gotham ssm b&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif&quot; style=&quot;background-color: #eaeaec; color: dimgrey; font-size: 16px; vertical-align: inherit;&quot;&gt;Concentrați-vă pe lucruri mai mari și îmbrățișați abordarea centrată pe tastatură pentru a obține cele mai multe caracteristici ale productivității PyCharm.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span face=&quot;&amp;quot;gotham ssm a&amp;quot; , &amp;quot;gotham ssm b&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif&quot; style=&quot;background-color: #eaeaec; color: dimgrey; font-size: 16px; vertical-align: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span face=&quot;&amp;quot;gotham ssm a&amp;quot; , &amp;quot;gotham ssm b&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif&quot; style=&quot;background-color: #eaeaec; color: dimgrey; font-size: 16px; vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h3 class=&quot;features-block__title&quot; style=&quot;border: 0px; color: #343434; font-size: 18px; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span face=&quot;&amp;quot;gotham ssm a&amp;quot; , &amp;quot;gotham ssm b&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif&quot; style=&quot;background-color: #eaeaec; color: dimgrey; font-size: 16px; vertical-align: inherit;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Obțineți asistență inteligentă&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;span face=&quot;&amp;quot;gotham ssm a&amp;quot; , &amp;quot;gotham ssm b&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif&quot; style=&quot;background-color: #eaeaec; color: dimgrey; font-size: 16px; vertical-align: inherit;&quot;&gt;
&lt;div style=&quot;border: 0px; line-height: 25px; margin-bottom: 10px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;PyCharm știe totul despre codul tău.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Bazați-vă pe acesta pentru finalizarea codului inteligent, verificarea erorilor pe loc și remedierile rapide, navigarea ușoară a proiectelor și multe altele.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;h3 class=&quot;features-block__title&quot; style=&quot;background-color: white; border: 0px; color: #343434; font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, Helvetica, Arial, sans-serif; font-size: 18px; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Îmbunătățiți calitatea codului&lt;/span&gt;&lt;/h3&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: dimgrey; font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 25px; margin-bottom: 10px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Scrieți un cod curat și întreținut, în timp ce IDE vă ajută să păstrați calitatea sub control cu ​​verificări PEP8, asistență de testare, refactorizări inteligente și o serie de inspecții.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;div class=&quot;features-block&quot; style=&quot;background-color: white; border: 0px; color: dimgrey; font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 25px; margin: 0px 0px 70px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;h3 class=&quot;features-block__title&quot; style=&quot;border: 0px; color: #343434; font-size: 18px; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Tot ce ai nevoie&lt;/span&gt;&lt;/h3&gt;
&lt;div style=&quot;border: 0px; line-height: 25px; margin-bottom: 10px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;PyCharm este proiectat de către programatori, pentru programatori, pentru a oferi toate instrumentele de care aveți nevoie pentru dezvoltarea productivă a Python.&lt;/span&gt;&lt;span style=&quot;background-color: transparent; border-radius: 40px; border: 1px solid rgb(204, 203, 203); box-sizing: border-box; color: #18a3fa; display: inline-block; font-family: inherit; font-size: 12px; font-weight: 700; height: 40px; letter-spacing: 0.5px; line-height: 40px; margin: 0px; outline: none; padding: 0px 20px; text-transform: uppercase; transition: all 0.2s ease 0s, all 0.2s ease 0s; vertical-align: inherit; white-space: nowrap;&quot;&gt;&lt;a class=&quot;button _secondary _light _size-2&quot; href=&quot;https://www.jetbrains.com/pycharm/download/download-thanks.html&quot; style=&quot;background-color: transparent; border-radius: 40px; border: 1px solid rgb(204, 203, 203); box-sizing: border-box; color: #18a3fa; display: inline-block; font-family: inherit; font-size: 12px; font-weight: 700; height: 40px; letter-spacing: 0.5px; line-height: 40px; margin: 0px; outline: none; padding: 0px 20px; text-decoration-line: none; text-transform: uppercase; transition: color 0.2s ease 0s, border-color 0.2s ease 0s; vertical-align: baseline; white-space: nowrap;&quot;&gt;DESCĂRCAȚI ACUM PYCHARM&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot;&gt;&lt;a href=&quot;https://www.jetbrains.com/pycharm/specials/pycharm/pycharm.html?gclid=Cj0KCQiAv_HSBRCkARIsAGaSsrBIuiUr3--GA_PoU5MltPwt_hvI2oQIs86V1VjKOtPrEqG1rIFcu00aAojnEALw_wcB&amp;amp;gclsrc=aw.ds.ds&amp;amp;dclid=CMCPwcb-2tgCFYGYdwodfW0ADQ&quot;&gt;PyCharm este proiectat de către programatori, pentru a oferi toate instrumentele de care aveți nevoie pentru dezvoltarea productivă a Python.&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://infotestpc.blogspot.com/feeds/7629365386661664367/comments/default' title='Postare comentarii'/><link rel='replies' type='text/html' href='http://infotestpc.blogspot.com/2018/01/python-pentru-incepatori.html#comment-form' title='0 comentarii'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5038728009841547747/posts/default/7629365386661664367'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5038728009841547747/posts/default/7629365386661664367'/><link rel='alternate' type='text/html' href='http://infotestpc.blogspot.com/2018/01/python-pentru-incepatori.html' title='Python pentru începători'/><author><name>Al Con</name><uri>http://www.blogger.com/profile/17409243868650327707</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUMA9qk78-YyG-sdcuecaYnLPZM02ldlzjNDc7x8-WAwwEz9Nl7LBWmMQCsO5I17ZPx6QxV9mSOuf6PLSVmRmD0j3hnw19SmbgaB9qLuMj-B8Ny_BCivWJ0efxvezcWSCi86EjTdAedg/s72-c/Astronau%25C8%259Bii+1.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5038728009841547747.post-8841227353260829524</id><published>2018-01-14T13:45:00.003-08:00</published><updated>2020-12-16T12:11:04.317-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="BAZE DE DATE"/><category scheme="http://www.blogger.com/atom/ns#" term="Calculatorul"/><category scheme="http://www.blogger.com/atom/ns#" term="HARDWARE"/><category scheme="http://www.blogger.com/atom/ns#" term="Initiere"/><category scheme="http://www.blogger.com/atom/ns#" term="Internet"/><category scheme="http://www.blogger.com/atom/ns#" term="Kali Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="procesorul"/><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><category scheme="http://www.blogger.com/atom/ns#" term="Site"/><title type='text'>Kali Linux sau Parrot </title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBkfVwCiRFg-TDDQXYgHNQRCf_QlKaoNa78W8f8-X7vSirstJw9W3gYTntxwIJkPx-yqciHP2StxXmKtGaYf47wNhdzmxcN_29Hr6oX5TJ5KE4HXle3MfGissPXSye5PX8vGmLtRX34Q/s775/Bildleiste-00.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;500&quot; data-original-width=&quot;775&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBkfVwCiRFg-TDDQXYgHNQRCf_QlKaoNa78W8f8-X7vSirstJw9W3gYTntxwIJkPx-yqciHP2StxXmKtGaYf47wNhdzmxcN_29Hr6oX5TJ5KE4HXle3MfGissPXSye5PX8vGmLtRX34Q/s320/Bildleiste-00.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;span face=&quot;&amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif&quot; style=&quot;background-color: white; border: 0px; color: #222222; font-size: 14.784px; margin: 0px; padding: 0px; vertical-align: inherit;&quot;&gt;Kali Linux este preinstalat cu peste 600 de programe de testare a pătrunderii, inclusiv nmap (un scaner de port), Wireshark (un analizor de pachete), John the Ripper (un cracare cu parole), Aircrack-ng (un pachet software pentru LAN fără fir pentru testarea penetrării) , Burp suite și OWASP ZAP (ambele scanere de securitate pentru aplicații web).&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;&amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif&quot; style=&quot;background-color: white; border: 0px; color: #222222; font-size: 14.784px; margin: 0px; padding: 0px; vertical-align: inherit;&quot;&gt;Kali Linux poate rula nativ când este instalat pe hard disk-ul unui computer, poate fi încărcat de pe un CD live sau live USB sau poate rula într-o mașină virtuală.&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;&amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif&quot; style=&quot;background-color: white; border: 0px; color: #222222; font-size: 14.784px; margin: 0px; padding: 0px; vertical-align: inherit;&quot;&gt;Este o platformă suportată de Metasploit Framework a proiectului Metasploit, un instrument pentru dezvoltarea și executarea exploitărilor de securitate.&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;options&quot; style=&quot;background-color: white; border: 0px; font-family: Roboto, sans-serif; font-size: 13.44px; margin: 10px 0px 0px; padding: 0px;&quot;&gt;
Download options:&lt;/div&gt;
&lt;div class=&quot;mirror-wrapper clearfix&quot; style=&quot;background-color: white; border: 0px; font-family: Roboto, sans-serif; font-size: 13.44px; margin: 0px 0px 15px; padding: 0px;&quot;&gt;
&lt;ul class=&quot;inline multi_line&quot; style=&quot;border: 0px; font-size: 13.44px; list-style: none; margin: 0px; padding: 0px;&quot;&gt;
&lt;li style=&quot;border: 0px; display: inline-block; font-size: 13.44px; list-style: none; margin: 8px 8px 0px 0px; max-width: 95%; padding: 0px; text-indent: 22px; width: 228.547px;&quot;&gt;&lt;a href=&quot;https://www.techspot.com/downloads/downloadnow/6738/?evp=7e087af1ea8b1811d5744556949f14ef&amp;amp;file=1&quot; style=&quot;background-color: #fafafa; border: 1px solid rgb(211, 211, 211); color: #0851ad; display: block; font-size: 14px; height: 27px; line-height: 28px; margin: 0px; padding: 0px 10px 1px 5px; position: relative; text-decoration-line: none; transition: all 0.1s linear 0s;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-origin: initial; background-position: 50% 50%; background-repeat: no-repeat; background-size: initial; background: url(&amp;quot;/images/download-arrow-mirror.svg&amp;quot;) center center no-repeat; border: 0px; display: block; height: inherit; left: 8px; margin: 0px; padding: 0px; position: absolute; width: 10px;&quot;&gt;&lt;/span&gt;Kali Linux ISO 64-bit&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;border: 0px; display: inline-block; font-size: 13.44px; list-style: none; margin: 8px 8px 0px 0px; max-width: 95%; padding: 0px; text-indent: 22px; width: 228.547px;&quot;&gt;&lt;a href=&quot;https://www.techspot.com/downloads/downloadnow/6738/?evp=7e087af1ea8b1811d5744556949f14ef&amp;amp;file=2&quot; style=&quot;background-color: #fafafa; border: 1px solid rgb(211, 211, 211); color: #0851ad; display: block; font-size: 14px; height: 27px; line-height: 28px; margin: 0px; padding: 0px 10px 1px 5px; position: relative; text-decoration-line: none; transition: all 0.1s linear 0s;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-origin: initial; background-position: 50% 50%; background-repeat: no-repeat; background-size: initial; background: url(&amp;quot;/images/download-arrow-mirror.svg&amp;quot;) center center no-repeat; border: 0px; display: block; height: inherit; left: 8px; margin: 0px; padding: 0px; position: absolute; width: 10px;&quot;&gt;&lt;/span&gt;Kali Linux ISO 32-bit&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;border: 0px; display: inline-block; font-size: 13.44px; list-style: none; margin: 8px 8px 0px 0px; max-width: 95%; padding: 0px; text-indent: 22px; width: 228.547px;&quot;&gt;&lt;a href=&quot;https://www.techspot.com/downloads/downloadnow/6738/?evp=7e087af1ea8b1811d5744556949f14ef&amp;amp;file=3&quot; style=&quot;background-color: #fafafa; border: 1px solid rgb(211, 211, 211); color: #0851ad; display: block; font-size: 14px; height: 27px; line-height: 28px; margin: 0px; padding: 0px 10px 1px 5px; position: relative; text-decoration-line: none; transition: all 0.1s linear 0s;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-origin: initial; background-position: 50% 50%; background-repeat: no-repeat; background-size: initial; background: url(&amp;quot;/images/download-arrow-mirror.svg&amp;quot;) center center no-repeat; border: 0px; display: block; height: inherit; left: 8px; margin: 0px; padding: 0px; position: absolute; width: 10px;&quot;&gt;&lt;/span&gt;Kai Light ISO 64-bit&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;border: 0px; display: inline-block; font-size: 13.44px; list-style: none; margin: 8px 8px 0px 0px; max-width: 95%; padding: 0px; text-indent: 22px; width: 228.547px;&quot;&gt;&lt;a href=&quot;https://www.techspot.com/downloads/downloadnow/6738/?evp=7e087af1ea8b1811d5744556949f14ef&amp;amp;file=4&quot; style=&quot;background-color: #fafafa; border: 1px solid rgb(211, 211, 211); color: #0851ad; display: block; font-size: 14px; height: 27px; line-height: 28px; margin: 0px; padding: 0px 10px 1px 5px; position: relative; text-decoration-line: none; transition: all 0.1s linear 0s;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-origin: initial; background-position: 50% 50%; background-repeat: no-repeat; background-size: initial; background: url(&amp;quot;/images/download-arrow-mirror.svg&amp;quot;) center center no-repeat; border: 0px; display: block; height: inherit; left: 8px; margin: 0px; padding: 0px; position: absolute; width: 10px;&quot;&gt;&lt;/span&gt;Kai Light ISO 32-bit&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;border: 0px; display: inline-block; font-size: 13.44px; list-style: none; margin: 8px 8px 0px 0px; max-width: 95%; padding: 0px; text-indent: 22px; width: 228.547px;&quot;&gt;&lt;a href=&quot;https://www.techspot.com/downloads/downloadnow/6738/?evp=7e087af1ea8b1811d5744556949f14ef&amp;amp;file=5&quot; style=&quot;background-color: #fafafa; border: 1px solid rgb(211, 211, 211); color: #0851ad; display: block; font-size: 14px; height: 27px; line-height: 28px; margin: 0px; padding: 0px 10px 1px 5px; position: relative; text-decoration-line: none; transition: all 0.1s linear 0s;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-origin: initial; background-position: 50% 50%; background-repeat: no-repeat; background-size: initial; background: url(&amp;quot;/images/download-arrow-mirror.svg&amp;quot;) center center no-repeat; border: 0px; display: block; height: inherit; left: 8px; margin: 0px; padding: 0px; position: absolute; width: 10px;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;br /&gt;
Sursa :&amp;nbsp; &amp;nbsp;&lt;a href=&quot;https://www.techspot.com/downloads/6738-kali-linux.html&quot;&gt;https://www.techspot.com/downloads/6738-kali-linux.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ol style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 16px; margin-bottom: 0px; margin-top: 0px; text-align: justify;&quot;&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: #050505; font-family: Arial; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;https://mateisoscel.blogspot.com/2020/12/ce-sa-mai-citim.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 18pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Ce să mai citim?&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;a href=&quot;https://mateisoscel.blogspot.com/2020/12/ce-sa-mai-citim.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Ce să mai citim?&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;a href=&quot;https://anunturigratuitenet.blogspot.com/2012/09/specialisti-in-domeniul-it.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Tatăl fondator al Uniunii Europene.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;a href=&quot;https://alecscon.blogspot.com/2013/01/colonizarea-de-pe-marte.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Colonizarea de pe Marte !&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #050505; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;https://alecscon.blogspot.com/2012/08/robot-pe-marte.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Ne pregătim pentru Marte&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;a href=&quot;https://alecscon.blogspot.com/2012/08/robot-pe-marte.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Colonizarea Marte poate determina umanitatea să-și modifice ADN-ul ?&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: #050505; font-family: Arial; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;a href=&quot;https://blogulucovid.blogspot.com/2020/12/cine-mai-uraste-sa-poarte-o-masca.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;Cine mai urăște să poarte mască?&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;h1 style=&quot;border-bottom: 1px solid rgb(195, 202, 213); color: #314d7c; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 26px; margin: 0px 0px 15px; padding: 20px 0px; text-align: start;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Cum să accelerați conexiunea la internet pe Linux&lt;/span&gt;&lt;/h1&gt;
&lt;/div&gt;
&lt;br /&gt;Uneori, site-urile Web de navigare par a fi oarecum &quot;nebunești&quot;, imaginile care nu se încarcă corect, valori de latență mari între computerul dvs. și serverul de rezolvare a DNS și problemele cache-ului online. Acest lucru poate fi un semn că DNS-ul furnizorului de servicii de internet nu este în sarcină, deci este posibil să trebuiască să treceți la o opțiune alternativă. Cele două cele mai populare alternative server DNS sunt DNS publică Google și OpenDNS, dar există și mai multe opțiuni libere de a utiliza alternative.&lt;br /&gt;&lt;br /&gt;Iată cum puteți trece la DNS public Google pe distribuțiile bazate pe Ubuntu. Deschideți setările de rețea și treceți la &quot;Setări avansate&quot;. Aceasta va deschide o fereastră nouă în care veți găsi filele &quot;Setări IPv4 și IPv6&quot;. Navigați la ambele și modificați &quot;Metoda&quot; de la numai DHCP (Automatic) (DHCP) la numai adresele (DHCP). Apoi introduceți &quot;8.8.8.8&quot; pe caseta serverelor DNS din fila IPv4 și &quot;2001: 4860: 4860 :: 8888&quot; pe fila IPv6. Acum, faceți clic pe butonul &quot;Salvați&quot; și ați terminat.&lt;div&gt;
&lt;div style=&quot;font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 14px; padding: 1em;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pentru a testa dacă noile setări DNS funcționează corect sau nu, introduceți orice adresă IP fixă ​​care indică spre un site web și vedeți dacă aceasta se rezolvă corect.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Introduceți &quot;91.189.94.40&quot; în bara de adrese a browserului dvs. și, dacă se rezolvă ubuntu.com, ați făcut lucrurile bine.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Puteți reveni mereu la DNS prestabilit, lăsând caseta serverelor DNS goale și setând metoda înapoi la &quot;Automatic (DHCP)&quot;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De asemenea, puteți compara noul DNS cu ajutorul utilitarului benchmarking DNS namebench open source și puteți vedea cât de mult a fost cu adevărat posibil navigarea pe Internet.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Este demn de remarcat faptul că schimbarea DNS îmbunătățește de asemenea confidențialitatea, securitatea și poate deschide accesul la conținut geoblocked.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
Sursa :&amp;nbsp;&lt;a href=&quot;https://www.howtoforge.com/tutorial/how-to-speed-up-your-internet-connection-on-linux/&quot;&gt;https://www.howtoforge.com/tutorial/how-to-speed-up-your-internet-connection-on-linux/&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;Tutorial Instalare Kali Linux - Distributie de Linux pentru Hackeri - Invata Securitate #5&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #fafafd; color: #4f5d75; font-family: &amp;quot;open sans&amp;quot;; font-size: 16px; text-align: justify;&quot;&gt;Kali Linux este distributia de Linux (cea mai) folosita de catre Hackeri si Pentesteri profesionisti datorita amalgamului de programe existente pe aceasta.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #4f5d75; font-family: &amp;quot;open sans&amp;quot;; font-size: 16px; text-align: justify;&quot;&gt;In Kali Linux poti gasi extrem de multe programe axate pe partea de securitate si mai exact pe partea de testare a vulnerabilitatii sistemului.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #4f5d75; font-family: &amp;quot;open sans&amp;quot;; font-size: 16px; text-align: justify;&quot;&gt;Pentru a instala Kali Linux, avem nevoie sa trecem prin cativa pasi. In primul rand avem&lt;/span&gt;&lt;a href=&quot;https://ramonnastase.ro/blog/tutorial-instalare-ubuntu-linux/&quot; rel=&quot;noopener&quot; style=&quot;background-color: white; box-sizing: border-box; color: #23527c; font-family: &amp;quot;Open Sans&amp;quot;; font-size: 16px; outline-offset: -2px; outline: 0px; text-align: justify; text-decoration-line: none; transition: all 300ms ease 0s;&quot; target=&quot;_blank&quot;&gt;&amp;nbsp;nevoie de programul VirtualBox&lt;/a&gt;&lt;span style=&quot;background-color: white; color: #4f5d75; font-family: &amp;quot;open sans&amp;quot;; font-size: 16px; text-align: justify;&quot;&gt;&amp;nbsp;(sau un alt program de virtualizare – ex: VMware Workstation) si de imaginea OS-ului Kali Linux (pe care o poti downloada printr-o simpla cautare pe Google)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #4f5d75; font-family: &amp;quot;open sans&amp;quot;; font-size: 16px; text-align: justify;&quot;&gt;Urmatorul pas, dupa descarcarea imaginii sistemului de operare Kali Linux si a programului de virtualizare Virtualbox revine procesului de instalare (mai exact creearii unei masini virtuale),&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #4f5d75; font-family: &amp;quot;open sans&amp;quot;; font-size: 16px; text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #4f5d75; font-family: &amp;quot;open sans&amp;quot;; font-size: 16px; text-align: justify;&quot;&gt;Sursa :&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #4f5d75; font-family: &amp;quot;open sans&amp;quot;;&quot;&gt;&lt;a href=&quot;https://ramonnastase.ro/blog/tutorial-instalare-kali-linux/&quot;&gt;https://ramonnastase.ro/blog/tutorial-instalare-kali-linux/&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Imaginile CD-urilor pot fi descărcate de la http://www.linux-iso.com/ şi din alte locuri, prezentate în
Appendix A.
O alternativă interesantă pentru cei care nu vor să facă pasul către o instalare a Linux-ului pe
calculatorul lor este cea a distribuţiilor de Linux care pot rula şi de pe CD, precum Knoppix
(http://www.knoppix.com/) sau Ubuntun.t. (http://www.ubuntu.com/ ).&lt;br /&gt;
● Capitolul 1: Ce este Linux-ul, cum a apărut el, avantaje şi dezavantaje, ce va aduce viitorul pentru
Linux, cine ar trebui să-l folosească, instalarea în calculatorul dumneavoastră.
● Capitolul 2: Să începem, autentificarea la sistem, comenzile de bază, unde să căutăm ajutor.
● Capitolul 3: Sistemul de fişiere, fişiere şi directoare importante, lucrul cu fişierele şi directoarele,
protejarea datelor.
● Capitolul 4: Înţelegerea proceselor şi lucrul cu acestea, procedurile de pornire şi închidere,
amânarea sarcinilor, sarcini repetitive.
● Capitolul 5: Ce este o intrare standard, o ieşire şi o eroare şi cum sunt folosite aceste elemente din
prompterul de comandă.
● Capitolul 6: De ce ar trebui să învăţaţi să lucraţi cu un editor de text, discutarea celor mai comune
editoare de text.
● Capitolul 7: Configurarea mediului dumneavoastră, grafic, text sau audio, setări pentru utilizatorii de
Linux pentru care engleza nu este limba maternă, sfaturi pentru adăugarea altor programe.
● Capitolul 8: Convertirea fişierelor în format pentru tipărire, scoaterea acestora la imprimantă, sfaturi
pentru rezolvarea problemelor legate de tipărire.
● Capitolul 9: Pregătirea datelor pentru copiile de rezervă, discutarea diverselor unelte, copii de
rezervă la distanţă.
● Capitolul 10: Trecerea în revistă a uneltelor de reţea ale Linux-ului şi a aplicaţiilor pentru utilizatori,
cu o scurtă discuţie axată pe programele tip servicii (service daemon) şi reţea securizată.
● Capitolul 11: Sunet şi video, incluzând aici Voice over IP şi înregistrarea sunetului.
● Appendix A: Ce cărţi să citiţi şi ce saituri să vizitaţi după terminarea acestei cărţi.
● Appendix B: O comparaţie.
● Appendix C: Dacă vă blocaţi, acest tabel poate fi de ajutor. De asemenea, un bun argument atunci
când şeful insistă ca DUMNEAVOASTRĂ să folosiţi shell-ul SĂU favorit.&lt;br /&gt;
Sursa :&amp;nbsp;&lt;a href=&quot;http://tille.garrels.be/training/tldp/ITL-Romanian.pdf&quot;&gt;http://tille.garrels.be/training/tldp/ITL-Romanian.pdf&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Parrot OS sau Kali Linux&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: #fbfbfb; color: #464241; font-family: &amp;quot;open sans&amp;quot;; font-size: 12px;&quot;&gt;Parrot &quot;arată&quot; mai bine cu unele caracteristici minunate, și are un TON de instrumente.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #fbfbfb; color: #464241; font-family: &amp;quot;open sans&amp;quot;; font-size: 12px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;border: 0px; color: #464241; font-family: &amp;quot;open sans&amp;quot;; font-size: 12px; margin: 0px; outline: 0px; padding: 0px; vertical-align: inherit; white-space: normal;&quot;&gt;&lt;span style=&quot;background: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: inherit;&quot;&gt;Cu toate acestea, dacă sunteți mai stabil, puteți sugera BT5R3.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: inherit;&quot;&gt;Iată o listă a lui Pentesting Distro, pe care o cunosc:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br style=&quot;color: #464241; font-family: &amp;quot;Open Sans&amp;quot;; font-size: 12px; white-space: normal;&quot; /&gt;&lt;span style=&quot;border: 0px; color: #464241; font-family: &amp;quot;open sans&amp;quot;; font-size: 12px; margin: 0px; outline: 0px; padding: 0px; vertical-align: inherit; white-space: normal;&quot;&gt;&lt;span style=&quot;background: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: inherit;&quot;&gt;Kali Linux&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br style=&quot;color: #464241; font-family: &amp;quot;Open Sans&amp;quot;; font-size: 12px; white-space: normal;&quot; /&gt;&lt;span style=&quot;border: 0px; color: #464241; font-family: &amp;quot;open sans&amp;quot;; font-size: 12px; margin: 0px; outline: 0px; padding: 0px; vertical-align: inherit; white-space: normal;&quot;&gt;&lt;span style=&quot;background: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: inherit;&quot;&gt;BackTrack (1,2,3,4,5)&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br style=&quot;color: #464241; font-family: &amp;quot;Open Sans&amp;quot;; font-size: 12px; white-space: normal;&quot; /&gt;&lt;span style=&quot;border: 0px; color: #464241; font-family: &amp;quot;open sans&amp;quot;; font-size: 12px; margin: 0px; outline: 0px; padding: 0px; vertical-align: inherit; white-space: normal;&quot;&gt;&lt;span style=&quot;background: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: inherit;&quot;&gt;Parrot OS&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br style=&quot;color: #464241; font-family: &amp;quot;Open Sans&amp;quot;; font-size: 12px; white-space: normal;&quot; /&gt;&lt;span style=&quot;border: 0px; color: #464241; font-family: &amp;quot;open sans&amp;quot;; font-size: 12px; margin: 0px; outline: 0px; padding: 0px; vertical-align: inherit; white-space: normal;&quot;&gt;&lt;span style=&quot;background: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: inherit;&quot;&gt;Backbox&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br style=&quot;color: #464241; font-family: &amp;quot;Open Sans&amp;quot;; font-size: 12px; white-space: normal;&quot; /&gt;&lt;span style=&quot;border: 0px; color: #464241; font-family: &amp;quot;open sans&amp;quot;; font-size: 12px; margin: 0px; outline: 0px; padding: 0px; vertical-align: inherit; white-space: normal;&quot;&gt;&lt;span style=&quot;background: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: inherit;&quot;&gt;BugTraq (1 și 2)&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br style=&quot;color: #464241; font-family: &amp;quot;Open Sans&amp;quot;; font-size: 12px; white-space: normal;&quot; /&gt;&lt;span style=&quot;border: 0px; color: #464241; font-family: &amp;quot;open sans&amp;quot;; font-size: 12px; margin: 0px; outline: 0px; padding: 0px; vertical-align: inherit; white-space: normal;&quot;&gt;&lt;span style=&quot;background: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: inherit;&quot;&gt;Cyborg Hawk&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;border: 0px; color: #464241; font-family: &amp;quot;open sans&amp;quot;; font-size: 12px; margin: 0px; outline: 0px; padding: 0px; vertical-align: inherit; white-space: normal;&quot;&gt;&lt;span style=&quot;background: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;color: #464241; font-family: &amp;quot;open sans&amp;quot;; font-size: 12px; white-space: normal;&quot;&gt;Kali Linux și este foarte foarte bun și actualizat frecvent.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;color: #464241; font-family: &amp;quot;open sans&amp;quot;; font-size: 12px; white-space: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;color: #464241; font-family: &amp;quot;open sans&amp;quot;; font-size: 12px; white-space: normal;&quot;&gt;Nu am putut instala kdirstat pe kali linux, cred că trebuie să dau seama cum să instalez software-ul extern descărcat în mod corespunzător&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;color: #464241; font-family: &amp;quot;open sans&amp;quot;; font-size: 12px; white-space: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;color: #464241; font-family: &amp;quot;open sans&amp;quot;; font-size: 12px; white-space: normal;&quot;&gt;Parrot în sine este în regulă, prea multe bug-uri pentru a fi viabile ca o soluție cu normă întreagă.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;color: #464241; font-family: &amp;quot;open sans&amp;quot;; font-size: 12px; white-space: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;background: rgb(251, 251, 251); border: 0px; color: #464241; font-family: &amp;quot;open sans&amp;quot;; font-size: 12px; margin: 0px; outline: 0px; padding: 0px; vertical-align: inherit; white-space: normal;&quot;&gt;&lt;span style=&quot;background: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: inherit;&quot;&gt;Cred ca KALI OS este mult mai stabil decat parrot os&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br style=&quot;background-color: #fbfbfb; color: #464241; font-family: &amp;quot;Open Sans&amp;quot;; font-size: 12px; white-space: normal;&quot; /&gt;&lt;span style=&quot;background: rgb(251, 251, 251); border: 0px; color: #464241; font-family: &amp;quot;open sans&amp;quot;; font-size: 12px; margin: 0px; outline: 0px; padding: 0px; vertical-align: inherit; white-space: normal;&quot;&gt;&lt;span style=&quot;background: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: inherit;&quot;&gt;si versiunea care vine in curand Kali v2.0 akka &quot;SANA&quot; arata mult mai stabila decat precedenta&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;color: #464241; font-family: &amp;quot;open sans&amp;quot;; font-size: 12px; white-space: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;color: #464241; font-family: &amp;quot;open sans&amp;quot;; font-size: 12px; white-space: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;color: #464241; font-family: &amp;quot;open sans&amp;quot;; font-size: 12px; white-space: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;color: #464241; font-family: &amp;quot;open sans&amp;quot;; font-size: 12px; white-space: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;color: #464241; font-family: &amp;quot;open sans&amp;quot;; font-size: 12px; white-space: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;color: #464241; font-family: &amp;quot;open sans&amp;quot;; font-size: 12px; white-space: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;color: #464241; font-family: &amp;quot;open sans&amp;quot;; font-size: 12px; white-space: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;color: #464241; font-family: &amp;quot;open sans&amp;quot;; font-size: 12px; white-space: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://infotestpc.blogspot.com/feeds/8841227353260829524/comments/default' title='Postare comentarii'/><link rel='replies' type='text/html' href='http://infotestpc.blogspot.com/2018/01/kali-linux-sau-parrot.html#comment-form' title='0 comentarii'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5038728009841547747/posts/default/8841227353260829524'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5038728009841547747/posts/default/8841227353260829524'/><link rel='alternate' type='text/html' href='http://infotestpc.blogspot.com/2018/01/kali-linux-sau-parrot.html' title='Kali Linux sau Parrot '/><author><name>Al Con</name><uri>http://www.blogger.com/profile/17409243868650327707</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBkfVwCiRFg-TDDQXYgHNQRCf_QlKaoNa78W8f8-X7vSirstJw9W3gYTntxwIJkPx-yqciHP2StxXmKtGaYf47wNhdzmxcN_29Hr6oX5TJ5KE4HXle3MfGissPXSye5PX8vGmLtRX34Q/s72-c/Bildleiste-00.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5038728009841547747.post-5144151734029788362</id><published>2018-01-13T21:03:00.002-08:00</published><updated>2020-12-16T12:11:54.064-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Initiere"/><category scheme="http://www.blogger.com/atom/ns#" term="Internet"/><category scheme="http://www.blogger.com/atom/ns#" term="programare"/><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><category scheme="http://www.blogger.com/atom/ns#" term="SEO"/><category scheme="http://www.blogger.com/atom/ns#" term="Server"/><category scheme="http://www.blogger.com/atom/ns#" term="Site"/><title type='text'>Python - Guido van Rossum</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot; style=&quot;color: blue;&quot;&gt;&lt;b&gt;Guido van Rossum, creatorul limbajului &lt;a href=&quot;https://swaroop.wordpress.com/notes/python_ro-introducere/&quot;&gt;Python&lt;/a&gt;, şi-a botezat limbajul dupa spectacolul BBC “Monty Python’s Flying Circus” (Circul zburător al lui Monty Python). De fapt el nu prea agreează şerpii constrictori, care ucid animale pentru hrană strivindu-le.&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot; style=&quot;color: blue;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizOpLxdi9JZQ2rL34_jagIWMH5xdrcvT4kOEOCd6k2WcqyUNgexdI_DY87byzGTFOoA99SK8CcgGM1QWu9n4ZLFH9yzD2e0Qu3P-PYJyNWGITcg3Du1udTEgEqh_ygG5_uSWD7rnTVqQ/s1600/Guido+van+Rossum+-+Programare+Phyton.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;156&quot; data-original-width=&quot;119&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizOpLxdi9JZQ2rL34_jagIWMH5xdrcvT4kOEOCd6k2WcqyUNgexdI_DY87byzGTFOoA99SK8CcgGM1QWu9n4ZLFH9yzD2e0Qu3P-PYJyNWGITcg3Du1udTEgEqh_ygG5_uSWD7rnTVqQ/s1600/Guido+van+Rossum+-+Programare+Phyton.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;span face=&quot;&amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif&quot; style=&quot;background-color: white; vertical-align: inherit;&quot;&gt;Guido van Rossum este creatorul Python, una dintre limbile de programare majore pe și de pe web.&lt;/span&gt;&lt;span face=&quot;&amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif&quot; style=&quot;background-color: white; vertical-align: inherit;&quot;&gt;Comunitatea Python se referă la el ca BDFL (Dictator Bunăvoitor Pentru Viață), un titlu direct dintr-o schiță Monty Python.&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;&amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif&quot; style=&quot;background-color: white; vertical-align: inherit;&quot;&gt;Sa mutat din Olanda în SUA în 1995, unde și-a întâlnit soția.&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;&amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif&quot; style=&quot;background-color: white; vertical-align: inherit;&quot;&gt;Până în iulie 2003, ei locuiau în suburbiile de la Virginia din nordul Washingtonului, împreună cu fiul lor Orlijn, care sa născut în 2001. Apoi, ei s-au mutat în Silicon Valley unde Guido lucrează acum pentru Google (petrecând 50% din timp pe Python!).&lt;/span&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif&quot; style=&quot;background-color: white; color: #212324; vertical-align: inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;&amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif&quot; style=&quot;background-color: white; color: #212324; font-size: 13.3333px; vertical-align: inherit;&quot;&gt;Această intrare în blog este Copyright © 2007 Guido van van Rossum.&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;&amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif&quot; style=&quot;background-color: white; color: #212324; font-size: 13.3333px; vertical-align: inherit;&quot;&gt;Toate drepturile rezervate.&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white; color: #093644;&quot;&gt;&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;background-color: white; color: #093644;&quot;&gt;&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;ol style=&quot;color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 16px; margin-bottom: 0px; margin-top: 0px; text-align: justify;&quot;&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: #050505; font-family: Arial; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;https://mateisoscel.blogspot.com/2020/12/ce-sa-mai-citim.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 18pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Ce să mai citim?&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;a href=&quot;https://mateisoscel.blogspot.com/2020/12/ce-sa-mai-citim.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Ce să mai citim?&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;a href=&quot;https://anunturigratuitenet.blogspot.com/2012/09/specialisti-in-domeniul-it.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Tatăl fondator al Uniunii Europene.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;a href=&quot;https://alecscon.blogspot.com/2013/01/colonizarea-de-pe-marte.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Colonizarea de pe Marte !&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #050505; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;https://alecscon.blogspot.com/2012/08/robot-pe-marte.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Ne pregătim pentru Marte&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;a href=&quot;https://alecscon.blogspot.com/2012/08/robot-pe-marte.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Colonizarea Marte poate determina umanitatea să-și modifice ADN-ul ?&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: #050505; font-family: Arial; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;a href=&quot;https://blogulucovid.blogspot.com/2020/12/cine-mai-uraste-sa-poarte-o-masca.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;Cine mai urăște să poarte mască?&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot;&gt;&lt;span id=&quot;docs-internal-guid-b3888444-f2fb-4017-0f5a-77d1001691cf&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h1 dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.45714; margin-bottom: 8pt; margin-top: 0pt;&quot;&gt;
&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot; style=&quot;font-size: small;&quot;&gt;&lt;a href=&quot;https://swaroop.wordpress.com/notes/python_ro-introducere/&quot; style=&quot;text-decoration: none;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Python ro:Introducere&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;background-color: transparent; color: #093644; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #f4f7f7; color: #093644; font-style: italic; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Python este un limbaj uşor de învăţat şi puternic. Deţine structuri de date de nivel înalt eficiente şi o abordare simplă dar efectivă asupra programării orientate pe obiecte. Sintaxa elegantă a lui Python şi modul dinamic de selecţie a tipului de date, împreună cu natura sa de limbaj interpretat, îl face un limbaj ideal pentru scriptare şi pentru dezvoltare rapidă de aplicaţii în multe domenii şi pe majoritatea platformelor existente.&lt;/span&gt;&lt;span style=&quot;background-color: #f4f7f7; color: #093644; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #093644; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Citirea unui program bine scris în Python dă aceeaşi senzaţie ca şi citirea unei nuvele în engleză, deşi cu o gramatică foarte strictă! Această natură de &lt;/span&gt;&lt;span style=&quot;background-color: white; color: blue; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;pseudocod &lt;/span&gt;&lt;span style=&quot;background-color: white; color: #093644; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;a lui Python &lt;/span&gt;&lt;span style=&quot;background-color: white; color: blue; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;este una din marile sale puteri.&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #093644; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: white; color: #093644; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Ea îţi permite să te concentrezi asupra soluţiei problemei mai degraba decât asupra limbajului însuşi.&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #093644; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;
&lt;h1 dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.45714; margin-bottom: 8pt; margin-top: 0pt;&quot;&gt;
&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot; style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-color: white; color: #093644; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Aşa cum vei vedea, cu &lt;/span&gt;&lt;span style=&quot;background-color: white; color: blue; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Python este extrem de uşor de început&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #093644; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;. &lt;/span&gt;&lt;span style=&quot;background-color: white; color: blue; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Python are o sintaxă extraordinar de simplă.&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #093644; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &amp;nbsp;Python este un exemplu de &lt;/span&gt;&lt;span style=&quot;background-color: white; color: #093644; font-style: italic; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;FLOSS&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #093644; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; (Free/Libre and Open Source Software). În termeni simpli, poţi distribui liber copii ale acestui software, citi codul sursă, modifica, folosi părţi din el în alte programe free. FLOSS se bazează pe conceptul de comunitate care pune cunoştinţe în comun. Acesta este unul din motivele pentru care Python este aşa de bun – el a fost creat şi îmbunătăţit constant de o comunitate care pur şi simplu îşi doreşte să vadă un Python tot mai bun.&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;
&lt;div&gt;
&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot; style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-color: white; color: #093644; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;

&lt;dl style=&quot;background-color: white; color: #093644;&quot;&gt;&lt;dd&gt;&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot;&gt;Când scrii programe în Python, nu ai nevoie să te preocupi de detalii de nivel scăzut precum managementul memoriei folosite de program etc…&lt;/span&gt;&lt;/dd&gt;&lt;/dl&gt;
&lt;dl style=&quot;background-color: white;&quot;&gt;
&lt;dt style=&quot;text-align: center;&quot;&gt;&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot; style=&quot;color: blue;&quot;&gt;&lt;b&gt;Portabil&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;dd style=&quot;color: #093644;&quot;&gt;&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot;&gt;Prin natura sa open source, Python a fost portat (modificat ca să funcţioneze) pe multe platforme. Toate programele tale Python pot funcţiona pe oricare din aceste platforme, fără a necesita vreo modificare, dacă programezi cu grija de a evita facilităţile dependente de sistem ale limbajului.&lt;/span&gt;&lt;/dd&gt;&lt;dd style=&quot;color: #093644;&quot;&gt;&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot;&gt;Poţi folosi Python pe Linux, Windows, FreeBSD, Macintosh, Solaris, OS/2, Amiga, AROS, AS/400, BeOS, OS/390, z/OS, Palm OS, QNX, VMS, Psion, Acorn RISC OS, VxWorks, PlayStation, Sharp Zaurus, Windows CE şi chiar pe PocketPC!&lt;/span&gt;&lt;/dd&gt;&lt;/dl&gt;
&lt;dl style=&quot;background-color: white;&quot;&gt;
&lt;dt style=&quot;text-align: center;&quot;&gt;&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot; style=&quot;color: blue;&quot;&gt;&lt;b&gt;Limbaj interpretat&lt;/b&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;dd style=&quot;color: #093644;&quot;&gt;&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot;&gt;Aici sunt necesare câteva explicaţii.&lt;/span&gt;&lt;/dd&gt;&lt;dd style=&quot;color: #093644;&quot;&gt;&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot;&gt;Un program scris întrun limbaj compilat, precum C sau C++ este convertit din limbajul sursă întrun format acceptat de calculator (codul binar, cu 1 şi 0) folosind un compilator cu diverse comutatoare şi opţiuni. Când rulezi programul link-editat, software-ul copiază programul de pe harddisc şi începe să îl execute.&lt;/span&gt;&lt;/dd&gt;&lt;dd style=&quot;color: #093644;&quot;&gt;&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot;&gt;Python, pe de altă parte, nu necesită compilare în binar. Pur şi simplu se lansează programul direct din codul sursă. Intern, Python converteşte codul sursă întrun format intermediar numit&amp;nbsp;&lt;i&gt;bytecodes&lt;/i&gt;&amp;nbsp;(rom. şir de octeţi), apoi pe acesta îl transformă în limbajul nativ al computerului (cod maşină) şi apoi îl rulează. În fapt toate acestea fac utilizarea limbajului Python mult mai uşoară fiindcă nu mai trebuie să porţi grija compilării programului, a verificării alegerii link-editarii şi încărcării corecte a bibliotecilor etc, etc. Din acelaşi motiv programele scrise în Python sunt mult mai portabile, doar le copiezi pe alt calculator şi imediat merg!&lt;/span&gt;&lt;/dd&gt;&lt;/dl&gt;
&lt;dl style=&quot;background-color: white;&quot;&gt;
&lt;dt style=&quot;text-align: center;&quot;&gt;&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot; style=&quot;color: blue;&quot;&gt;&lt;b&gt;Limbaj orientat pe obiecte&lt;/b&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;dd style=&quot;color: #093644;&quot;&gt;&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot;&gt;Python suportă şi programarea procedurală, pe lângă programarea orientată pe obiecte. În limbajele&amp;nbsp;&lt;i&gt;orientate pe proceduri&lt;/i&gt;&amp;nbsp;programele sunt construite în jurul procedurilor şi funcţiilor acestea nefiind altceva decât porţiuni de program reutilizabile. În limbajele&amp;nbsp;&lt;i&gt;orientate pe obiecte&lt;/i&gt;&amp;nbsp;programul este construit În jurul obiectelor, care combină datele şi funcţionalitatea. Python are o metodă foarte puternică, dar simplă de a face programare orientată pe obiecte (OOP), în special în comparaţie cu marile limbaje precum Java sau C++.&lt;/span&gt;&lt;/dd&gt;&lt;/dl&gt;
&lt;dl style=&quot;background-color: white;&quot;&gt;
&lt;dt style=&quot;text-align: center;&quot;&gt;&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot; style=&quot;color: blue;&quot;&gt;&lt;b&gt;Extensibil&lt;/b&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;dd style=&quot;color: #093644;&quot;&gt;&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot;&gt;Dacă ai nevoie ca o porţiune din codul programului să ruleze foarte rapid sau vrei ca unele soluţii de algoritm să nu fie&amp;nbsp;&lt;i&gt;open&lt;/i&gt;, poţi coda partea aceea în C sau C++ şi poţi apela acea parte direct din programul Python.&lt;/span&gt;&lt;/dd&gt;&lt;/dl&gt;
&lt;dl style=&quot;background-color: white;&quot;&gt;
&lt;dt style=&quot;text-align: center;&quot;&gt;&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot; style=&quot;color: blue;&quot;&gt;&lt;b&gt;Implantabil&lt;/b&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;dd style=&quot;color: #093644;&quot;&gt;&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot;&gt;Se poate implanta cod Python în programe C/C++ pentru a le oferi facilităţi de ‘scripting’ utilizatorilor programelor.&lt;/span&gt;&lt;/dd&gt;&lt;/dl&gt;
&lt;dl style=&quot;background-color: white;&quot;&gt;
&lt;dt style=&quot;text-align: center;&quot;&gt;&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot; style=&quot;color: blue;&quot;&gt;&lt;b&gt;Biblioteci extinse&lt;/b&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;dd style=&quot;color: #093644;&quot;&gt;&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot;&gt;Biblioteca standard Python este cu adevărat uriaşă. Te poate ajuta să rezolvi diverse probleme referitoare la expresii regulare, generare de documentaţie, testare de părţi, gestiune de fire de execuţie, baze de date, browsere web, CGI, ftp, email, XML, XML-RPC, HTML, fişiere .WAV, criptografie, GUI (graphical user interfaces), Tk şi alte lucruri dependente de sistem. Reţineţi, toate acestea sunt prezente unde este instalat Python. Acest lucru este aşa-numita filozofie ‘cu baterii incluse’ a limbajului Python.&lt;/span&gt;&lt;/dd&gt;&lt;dd style=&quot;color: #093644;&quot;&gt;&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot;&gt;Pe lângă biblioteca standard există diferite alte biblioteci de foarte bună calitate, precum&lt;a class=&quot;external text&quot; href=&quot;http://www.wxpython.org/&quot; rel=&quot;nofollow&quot; style=&quot;color: #c84e05; text-decoration-line: none;&quot;&gt;wxPython&lt;/a&gt;,&amp;nbsp;&lt;a class=&quot;external text&quot; href=&quot;http://www.twistedmatrix.com/products/twisted&quot; rel=&quot;nofollow&quot; style=&quot;color: #c84e05; text-decoration-line: none;&quot;&gt;Twisted&lt;/a&gt;,&amp;nbsp;&lt;a class=&quot;external text&quot; href=&quot;http://www.pythonware.com/products/pil/index.htm&quot; rel=&quot;nofollow&quot; style=&quot;color: #c84e05; text-decoration-line: none;&quot;&gt;Python Imaging Library&lt;/a&gt;&amp;nbsp;şi multe altele.&lt;/span&gt;&lt;/dd&gt;&lt;/dl&gt;
&lt;div style=&quot;background-color: white; color: #093644; line-height: 20px; padding: 0px 0px 15px;&quot;&gt;
&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot;&gt;Python este întradevăr un limbaj puternic şi antrenant. Are combinaţia corectă de performanţă şi facilităţi care fac scrierea de programe în Python şi distractivă şi uşoară.&lt;/span&gt;&lt;/div&gt;
&lt;h2 style=&quot;background-color: white; clear: both; color: #093644; font-weight: 400; line-height: 34px; margin: 0px 0px 10px; padding: 0px;&quot;&gt;
&lt;span class=&quot;mw-headline&quot; id=&quot;De_ce_nu_Perl.3F&quot;&gt;&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot; style=&quot;font-size: small;&quot;&gt;De ce nu Perl?&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;background-color: white; color: #093644; line-height: 20px; padding: 0px 0px 15px;&quot;&gt;
&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot;&gt;Dacă nu ştiaţi deja, Perl este un alt limbaj de programare open-source interpretat.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #093644; line-height: 20px; padding: 0px 0px 15px;&quot;&gt;
&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot;&gt;Dacă aţi fi încercat vreodată să scrieţi un program mare în Perl, v-aţi fi răspuns singuri la întrebare!&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #093644; line-height: 20px; padding: 0px 0px 15px;&quot;&gt;
&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot;&gt;Cu alte cuvinte programele în Perl sunt uşoare când sunt mici şi excelează la mici găselniţe şi scripturi de ‘făcut treaba’. Oricum, ele devin rapid prea complexe îndată ce încep să crească şi vă spun asta din propria experienţă de autor de programe în Perl la Yahoo!&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #093644; line-height: 20px; padding: 0px 0px 15px;&quot;&gt;
&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot;&gt;Comparativ cu Perl, programele Python sunt clar mai simple, mai curate, mai uşor de scris şi astfel mai uşor de înţeles şi întreţinut. Eu admir Perl-ul şi îl folosesc zilnic pentru diverse lucruri, dar când încep să scriu un program încep prin a-l gândi în termenii de Python pentru că mie îmi vine mai natural aşa. Perl a suferit aşa de multe perfecţionări şi schimbări încât el pare a fi o mare (dar foarte utilă)găselniţă. Regretabil, dar aşteptatul Perl 6 nu pare a face progrese din acest punct de vedere.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #093644; line-height: 20px; padding: 0px 0px 15px;&quot;&gt;
&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot;&gt;Singurul avantaj foarte semnificativ pentru Perl este reţeaua sa de arhive de module&amp;nbsp;&lt;a class=&quot;external text&quot; href=&quot;http://cpan.perl.org/&quot; rel=&quot;nofollow&quot; style=&quot;color: #c84e05; text-decoration-line: none;&quot;&gt;CPAN&lt;/a&gt;&amp;nbsp;(the Comprehensive Perl Archive Network). Aşa cum sugerează şi numele ei, CPAN este o colecţie uriaşă de module Perl care impresionează prin extindere şi profunzime – folosind aceste module poţi face virtual orice. Unul din motivele pentru care Perl are mai multe module ca Python este acela că el a apărut mai demult decât Python. În orice caz, situaţia asta pare a se schimba datorită indexului&amp;nbsp;&lt;a class=&quot;external text&quot; href=&quot;http://pypi.python.org/pypi&quot; rel=&quot;nofollow&quot; style=&quot;color: #c84e05; text-decoration-line: none;&quot;&gt;Python Package Index&lt;/a&gt;&amp;nbsp;de pachete Python.&lt;/span&gt;&lt;/div&gt;
&lt;h2 style=&quot;background-color: white; clear: both; color: #093644; font-weight: 400; line-height: 34px; margin: 0px 0px 10px; padding: 0px;&quot;&gt;
&lt;span class=&quot;mw-headline&quot; id=&quot;De_ce_nu_Ruby.3F&quot;&gt;&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot; style=&quot;font-size: small;&quot;&gt;De ce nu Ruby?&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;background-color: white; color: #093644; line-height: 20px; padding: 0px 0px 15px;&quot;&gt;
&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot;&gt;Dacă nu stiaţi deja, Ruby este un alt limbaj de programare open-source interpretat.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #093644; line-height: 20px; padding: 0px 0px 15px;&quot;&gt;
&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot;&gt;Dacă deja apreciaţi şi folositi Ruby, atunci în mod cert vă recomand să continuaţi să-l folosiţi.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #093644; line-height: 20px; padding: 0px 0px 15px;&quot;&gt;
&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot;&gt;Pentru ceilalti, care nu l-au folosit şi încearcă să judece dacă să înveţe Ruby sau Python, as recomanda Python, pe baza criteriului uşurinţei de învătare. Personal, l-am găsit greu de asimilat, dar cei ce înteleg Ruby propovăduiesc frumuseţea sa. Din nefericire nu sunt atât de norocos.&lt;/span&gt;&lt;/div&gt;
&lt;h2 style=&quot;background-color: white; clear: both; color: #093644; font-weight: 400; line-height: 34px; margin: 0px 0px 10px; padding: 0px;&quot;&gt;
&lt;span class=&quot;mw-headline&quot; id=&quot;Ce_spun_programatorii&quot;&gt;&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot; style=&quot;font-size: small;&quot;&gt;Ce spun programatorii&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;background-color: white; color: #093644; line-height: 20px; padding: 0px 0px 15px;&quot;&gt;
&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot;&gt;Poate vă interesează să citiţi părerea unor mari hackeri, precum ESR despre Python:&lt;/span&gt;&lt;/div&gt;
&lt;ul style=&quot;background-color: white; color: #093644; list-style-type: none; margin: 0px; padding: 0px 0px 15px;&quot;&gt;
&lt;li style=&quot;list-style-type: square; margin: 0px 0px 0px 20px; padding: 0px;&quot;&gt;&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;Eric S. Raymond&lt;/b&gt;&amp;nbsp;este autorul lucrării ‘Catedrala şi bazarul’ fiind de asemenea părintele termenului ‘Open Source’. El spune că&amp;nbsp;&lt;a class=&quot;external text&quot; href=&quot;http://www.linuxjournal.com/article.php?sid=3882&quot; rel=&quot;nofollow&quot; style=&quot;color: #c84e05; text-decoration-line: none;&quot;&gt;Python a devenit limbajul său de programare favorit&lt;/a&gt;. Acel articol a fost o adevărată inspiraţie pentru abordarea primelor mele programe în Python.&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;list-style-type: square; margin: 0px 0px 0px 20px; padding: 0px;&quot;&gt;&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;Bruce Eckel&lt;/b&gt;&amp;nbsp;este autorul faimoaselor cărţi ‘Gândire în Java’ şi ‘Gândire în C++’. El spune că nici un limbaj de programare nu i-a adus o productivitate mai mare ca Python. În plus Python este probabil singurul limbaj focalizat pe a uşura munca programatorului. Citeşte&amp;nbsp;&lt;a class=&quot;external text&quot; href=&quot;http://www.artima.com/intv/aboutme.html&quot; rel=&quot;nofollow&quot; style=&quot;color: #c84e05; text-decoration-line: none;&quot;&gt;interviul complet&lt;/a&gt;pentru alte detalii.&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;list-style-type: square; margin: 0px 0px 0px 20px; padding: 0px; position: static;&quot;&gt;&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;Peter Norvig&lt;/b&gt;&amp;nbsp;este un binecunoscut autor de programe LISP, director de calitatea căutării la Google (mulţumiri lui Guido van Rossum pentru acest pont). El spune ca Python a fost întotdeauna parte integrantă din Google. Îi poţi verifica declaraţia pe pagina&amp;nbsp;&lt;a class=&quot;external text&quot; href=&quot;http://www.google.com/jobs/index.html&quot; rel=&quot;nofollow&quot; style=&quot;color: #c84e05; text-decoration-line: none;&quot;&gt;Google Jobs&lt;/a&gt;&amp;nbsp;care arată cerinţa obligatorie de cunoştinţe de Python pentru inginerii de software.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 style=&quot;background-color: white; clear: both; color: #093644; font-weight: 400; line-height: 34px; margin: 0px 0px 10px; padding: 0px;&quot;&gt;
&lt;span class=&quot;mw-headline&quot; id=&quot;Despre_Python_3.0&quot;&gt;&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot; style=&quot;font-size: small;&quot;&gt;Despre Python 3.0&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;background-color: white; color: #093644; line-height: 20px; padding: 0px 0px 15px;&quot;&gt;
&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot;&gt;Python 3.0 este noua versiune în devenire a limbajului. I se mai spune ‘Python 3000’ sau ‘Py3K’.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #093644; line-height: 20px; padding: 0px 0px 15px;&quot;&gt;
&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot;&gt;Motivul principal pentru o nouă versiune majoră a limbajului Python este eliminarea tuturor micilor probleme şi critici acumulate peste ani şi a face limbajul chiar mai curat.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #093644; line-height: 20px; padding: 0px 0px 15px;&quot;&gt;
&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot;&gt;Daca ai deja mult cod Python versiunea 2.x, există un&amp;nbsp;&lt;a class=&quot;external text&quot; href=&quot;http://docs.python.org/dev/3.0/library/2to3.html&quot; rel=&quot;nofollow&quot; style=&quot;color: #c84e05; text-decoration-line: none;&quot;&gt;utilitar&lt;/a&gt;&amp;nbsp;pentru a te ajuta să converteşti codul sursă din versiunea 2.x în versiunea 3.x.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #093644; line-height: 20px; padding: 0px 0px 15px;&quot;&gt;
&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot;&gt;Mai multe detalii în:&lt;/span&gt;&lt;/div&gt;
&lt;ul style=&quot;background-color: white; color: #093644; list-style-type: none; margin: 0px; padding: 0px 0px 15px;&quot;&gt;
&lt;li style=&quot;list-style-type: square; margin: 0px 0px 0px 20px; padding: 0px;&quot;&gt;&lt;a class=&quot;external text&quot; href=&quot;http://www.artima.com/weblogs/viewpost.jsp?thread=208549&quot; rel=&quot;nofollow&quot; style=&quot;color: #c84e05; text-decoration-line: none;&quot;&gt;&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot;&gt;Introducerea lui Guido van Rossum&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;list-style-type: square; margin: 0px 0px 0px 20px; padding: 0px;&quot;&gt;&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot;&gt;&lt;a class=&quot;external text&quot; href=&quot;http://docs.python.org/dev/whatsnew/2.6.html&quot; rel=&quot;nofollow&quot; style=&quot;color: #c84e05; text-decoration-line: none;&quot;&gt;Ce e nou în Python 2.6&lt;/a&gt;&amp;nbsp;(facilităţi sensibil diferite de versiunile 2.x precedente care probabil vor fi incluse în Python 3.0)&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;list-style-type: square; margin: 0px 0px 0px 20px; padding: 0px;&quot;&gt;&lt;a class=&quot;external text&quot; href=&quot;http://docs.python.org/dev/3.0/whatsnew/3.0.html&quot; rel=&quot;nofollow&quot; style=&quot;color: #c84e05; text-decoration-line: none;&quot;&gt;&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot;&gt;Ce e nou în Python 3.0&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;list-style-type: square; margin: 0px 0px 0px 20px; padding: 0px;&quot;&gt;&lt;a class=&quot;external text&quot; href=&quot;http://www.python.org/dev/peps/pep-0361/&quot; rel=&quot;nofollow&quot; style=&quot;color: #c84e05; text-decoration-line: none;&quot;&gt;&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot;&gt;Python 2.6 şi graficul de lansare al versiunii 3.0&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;list-style-type: square; margin: 0px 0px 0px 20px; padding: 0px;&quot;&gt;&lt;a class=&quot;external text&quot; href=&quot;http://www.python.org/dev/peps/pep-3000/&quot; rel=&quot;nofollow&quot; style=&quot;color: #c84e05; text-decoration-line: none;&quot;&gt;&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot;&gt;Python 3000 (lista oficială definitivă a schimbărilor propuse)&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;list-style-type: square; margin: 0px 0px 0px 20px; padding: 0px;&quot;&gt;&lt;a class=&quot;external text&quot; href=&quot;http://www.python.org/dev/peps/pep-3100/&quot; rel=&quot;nofollow&quot; style=&quot;color: #c84e05; text-decoration-line: none;&quot;&gt;&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot;&gt;Diverse planuri Python 3.0&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;list-style-type: square; margin: 0px 0px 0px 20px; padding: 0px;&quot;&gt;&lt;a class=&quot;external text&quot; href=&quot;http://www.python.org/download/releases/3.0/NEWS.txt&quot; rel=&quot;nofollow&quot; style=&quot;color: #c84e05; text-decoration-line: none;&quot;&gt;&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot;&gt;Noutăţi Python (lista detaliată a modificărilor)&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot; style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-color: white; color: #093644; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot; style=&quot;color: #093644;&quot;&gt;&lt;a href=&quot;https://swaroop.wordpress.com/notes/python_ro-introducere/&quot;&gt;https://swaroop.wordpress.com/notes/python_ro-introducere/ &lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În comparație cu alte limbi de programare, mecanismul clasei Python adaugă clase cu un minim de sintaxă și semantică noi.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Este un amestec al mecanismelor de clasă descoperite în C ++ și Modula-3.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Clasele Python oferă toate caracteristicile standard ale programării orientate pe obiecte: mecanismul de moștenire a clasei permite mai multor clase de bază, o clasă derivată poate suprascrie orice metodă a clasei sau clasei sale de bază și o metodă poate apela metoda unei clase de bază cu același nume .&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Obiectele pot conține cantități arbitrare și tipuri de date.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Așa cum este valabil și pentru module, clasele participă la natura dinamică a Python: ele sunt create în timpul execuției și pot fi modificate ulterior după crearea.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În terminologia C ++, în mod normal, membrii clasei (inclusiv membrii de date) sunt&amp;nbsp;&lt;/span&gt;&lt;em&gt;publici&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;(cu excepția&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#tut-private&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em&gt;vederilor Variabile Private&lt;/em&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;) și toate funcțiile membre sunt&amp;nbsp;&lt;/span&gt;&lt;em&gt;virtuale&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Ca și în Modula-3, nu există contorii pentru referirea membrilor obiectului din metodele sale: funcția de metodă este declarată cu un prim argument explicit reprezentând obiectul, care este furnizat implicit de apel.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Ca și în Smalltalk, clasele sunt obiecte.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Aceasta oferă semantică pentru import și redenumire.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Spre deosebire de C ++ și Modula-3, tipurile încorporate pot fi folosite ca clase de bază pentru extensie de către utilizator.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De asemenea, ca în C ++, majoritatea operatorilor încorporați cu sintaxă specială (operatori aritmetici, subscripting etc.) pot fi redefiniți pentru instanțe de clasă.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;(Lipsa terminologiei universal acceptate pentru a vorbi despre clase, voi folosi ocazional termenii Smalltalk și C ++. Aș folosi termeni Modula-3, deoarece semantica orientată pe obiect este mai apropiată de cea a lui Python decât C ++, dar mă aștept ca puțini cititori au auzit de ea.)&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Obiectele au individualitate, iar mai multe nume (în mai multe domenii) pot fi legate la același obiect.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Aceasta este cunoscută sub numele de aliasing în alte limbi.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest lucru nu este de obicei apreciat la prima vedere la Python și poate fi ignorat în siguranță atunci când se ocupă cu tipuri de bază imuabile (numere, șiruri, tuple).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Cu toate acestea, aliasingul are un efect surprinzător posibil asupra semanticii codului Python care implică obiecte mutabile, cum ar fi listele, dicționarele și majoritatea celorlalte tipuri.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Aceasta este de obicei folosită în beneficiul programului, deoarece pseudonimurile se comportă ca indicii în anumite privințe.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu, trecerea unui obiect este ieftină, deoarece doar un indicator este trecut prin implementare;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;și dacă o funcție modifică un obiect trecut ca argument, apelantul va vedea schimbarea - aceasta elimină necesitatea existenței a două mecanisme diferite de trecere a argumentelor ca în Pascal.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Înainte de a introduce clase, trebuie să vă spun mai întâi despre regulile de aplicare a Python.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Definițiile de clasă joacă niște trucuri îngrijite cu spații de nume și trebuie să știți cum funcționează domeniile și spațiile de nume pentru a înțelege pe deplin ce se întâmplă.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De altfel, cunoștințele despre acest subiect sunt utile pentru orice programator Python avansat.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;python-scopes-and-namespaces&quot; style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 16px;&quot;&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Un&amp;nbsp;&lt;/span&gt;&lt;em&gt;spațiu de nume&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este o mapare de la nume la obiecte.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Majoritatea spațiilor de nume sunt implementate în prezent ca dicționare Python, dar în mod normal nu sunt vizibile în niciun fel (cu excepția performanței) și se pot schimba în viitor.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Exemple de spații de nume sunt: ​​setul de nume încorporate (care conțin funcții precum&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#abs&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;abs&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;abs ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și nume excepționale construite);&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;numele globale dintr-un modul;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;și numele locale într-o invocare a funcțiilor.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Într-un sens, mulțimea de atribute ale unui obiect formează și un spațiu de nume.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Lucrul important de știut despre spațiile de nume este că nu există absolut nicio legătură între numele în spații de nume diferite;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;de exemplu, două module diferite pot să definească o funcție&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;maximizată&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;fără confuzie - utilizatorii modulelor trebuie să o prefixeze cu numele modulului.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Apropo, folosesc&amp;nbsp;&lt;/span&gt;&lt;em&gt;atributul&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;cuvânt&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pentru orice nume care urmează un punct - de exemplu, în expresia&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;z.real&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;,&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;real&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este un atribut al obiectului&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;z&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În mod strict vorbind, referințele la nume în module sunt referințe atribute: în expresia&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;modname.funcname&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;,&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;modname&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este un obiect de module și&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;funcname&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;este un atribut al acestuia.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În acest caz se întâmplă o mapare simplă între atributele modulului și denumirile globale definite în modul: aceștia împărtășesc același spațiu de nume!&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;footnote-reference&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#id2&quot; id=&quot;id1&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;[1]&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Atributele pot fi doar pentru citire sau scriere.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În ultimul caz, este posibilă alocarea atributelor.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Atributele modulului sunt inscriptibile: puteți scrie&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;modname.the_answer&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;=&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;42&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Atributele de scriere pot fi șterse și cu&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;instrucțiunea&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/simple_stmts.html#del&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;del&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;del&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;modname.the_answer&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;va elimina atributul&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;xref py py-attr docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;the_answer&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;de la obiectul numit&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;modname&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Spațiile de nume sunt create în momente diferite și au durate diferite de viață.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Spațiul de nume care conține numele încorporate este creat atunci când interpretul Python pornește și nu este șters niciodată.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Spațiul de nume global pentru un modul este creat atunci când se citește definiția modulului;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;în mod normal, numerele de module ale modulelor durează și până când interpretul se oprește.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Instrucțiunile executate de invocarea de nivel superior a interpretului, fie citite dintr-un fișier script, fie interactiv, sunt considerate ca parte a unui modul numit&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/__main__.html#module-__main__&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;__main__: mediul în care se execută scriptul de nivel superior.&quot;&gt;&lt;tt class=&quot;xref py py-mod docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;__main__&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, deci au propriul lor spațiu de nume global.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;(Numele încorporate trăiesc de asemenea într-un modul, acest lucru se numește&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/builtins.html#module-builtins&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;builtins: modulul care furnizează spațiul de nume încorporat.&quot;&gt;&lt;tt class=&quot;xref py py-mod docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;builtins&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Spațiul de nume local pentru o funcție este creat atunci când funcția este apelată și șters atunci când funcția returnează sau ridică o excepție care nu este tratată în cadrul funcției.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;(De fapt, uitarea ar fi o modalitate mai bună de a descrie ce se întâmplă de fapt). Desigur, invocările recursive au fiecare propriul lor spațiu de nume local.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Un&amp;nbsp;&lt;/span&gt;&lt;em&gt;domeniu&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este o regiune textuală a unui program Python în care un spațiu de nume este direct accesibil.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&quot;Direct accesibil&quot; înseamnă că o referință necalificată la un nume încearcă să găsească numele în spațiul de nume.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Deși scopurile sunt determinate static, ele sunt folosite dinamic.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În orice moment în timpul execuției, există cel puțin trei domenii imbricate ale căror spații de nume sunt direct accesibile:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;domeniul de aplicare cel mai intim, care este căutat în primul rând, conține numele locale&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;domeniile oricărei funcții de închidere, care sunt căutate începând cu cel mai apropiat domeniu de aplicare, conțin nume non-locale, dar și non-globale&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;următorul domeniu de aplicare conține numele global al modulului curent&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;cel mai îndepărtat domeniu (ultimul căutat) este spațiul de nume care conține numele încorporate&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă un nume este declarat global, atunci toate referințele și alocările merg direct la domeniul de aplicare intermediar care conține numele global al modulului.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pentru a rebrand variabilele găsite în afara domeniului interior,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;se poate folosi declarația&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/simple_stmts.html#nonlocal&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;nonlocală&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;dacă nu sunt declarate nonlocale, acele variabile sunt doar pentru citire (încercarea de a scrie la o astfel de variabilă va crea pur și simplu o&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;nouă&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;variabilă locală în interiorul domeniului interior, lăsând neschimbată variabila externă identică).&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De obicei, domeniul de aplicare local se referă la numele local al funcției curente (textuale).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În afara funcțiilor, domeniul de aplicare local se referă la același spațiu de nume ca și domeniul global: spațiul de nume al modulului.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Definițiile de clasă plasează încă un spațiu de nume în domeniul de aplicare local.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Este important să ne dăm seama că domeniile sunt determinate textual: domeniul global al unei funcții definite într-un modul este spațiul de nume al modulului, indiferent de unde sau prin ce nume se numește funcția.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pe de altă parte, căutarea reală a numelor se face dinamic, la momentul executării - totuși, definiția limbii evoluează spre rezolvarea numelui static, la momentul &quot;compilației&quot;, deci nu vă bazați pe rezoluția dinamică a numelui!&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;(De fapt, variabilele locale sunt deja determinate static.)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;O chestiune specială a lui Python este că - dacă nu există nicio&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;declarație&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/simple_stmts.html#global&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;globală&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;- atribuțiile la nume intră întotdeauna în domeniul cel mai intim.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Atribuțiile nu copiază date - ci doar leagă numele la obiecte.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Același lucru este valabil și pentru ștergeri: instruciunea&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;del&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;x&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;elimină legarea lui&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;x&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;din spațiul de nume referit de domeniul de aplicare local.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De fapt, toate operațiunile care introduc nume noi utilizează domeniul de aplicare local: în special,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;declarațiile de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/simple_stmts.html#import&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;import&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și definițiile funcțiilor leagă numele modulului sau al funcției în domeniul local.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Declarația&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/simple_stmts.html#global&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;globală&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;poate fi utilizată pentru a indica faptul că anumite variabile trăiesc în sfera globală și ar trebui să revină acolo;&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/simple_stmts.html#nonlocal&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;nelocal&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;declarație indică faptul că anumite variabile trăiesc într -&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;un domeniu de&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;aplicare împrejmuitor și ar trebui să fie de&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;rebound acolo.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;scopes-and-namespaces-example&quot;&gt;
&lt;span id=&quot;tut-scopeexample&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h3 style=&quot;border: 0px; color: #1a1a1a; font-size: 22.4px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;9.2.1.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Exemple de spații și nume de case&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#scopes-and-namespaces-example&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acesta este un exemplu care demonstrează modul de referință a diferitelor domenii și spații de nume și modul în care influența&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/simple_stmts.html#global&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;globală&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/simple_stmts.html#nonlocal&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;nelocală&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;afectează variația obligatorie:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;def &lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;scope_test &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(): &lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;def &lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;do_local &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(): de &lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;spam &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;spam local&quot; &lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;def &lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;do_nonlocal &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(): &lt;/span&gt;
        &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;nelocal de &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;spam &lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;spam - &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;spam nelocal&quot; &lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;def &lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;do_global &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(): la &lt;/span&gt;
        &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;nivel mondial de &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;spam de &lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;spam &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&quot; la &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;nivel mondial spam&quot; de &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;spam &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&quot;test de &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;spam&quot; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;do_local &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( ) &lt;/span&gt;
    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;După asignarea locală:&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;spam &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;do_nonlocal &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;() &lt;/span&gt;
    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;După alocare &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;nelocală &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;:&quot; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;spam &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;do_global&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;() &lt;/span&gt;
    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;După asignarea globală:&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;spam &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;scope_test &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;() &lt;/span&gt;
&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;În scop global:&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;spam &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Rezultatul exemplului de cod este:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-none&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;După atribuirea locală: încercați spam&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
După alocarea nelocală: spam nonlocal&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
După alocare globală: spam nonlocal&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
În domeniul global: spam global&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Notă modul în care&amp;nbsp;&lt;/span&gt;&lt;em&gt;locale&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;alocare (care este implicit) nu a modificat&amp;nbsp;&lt;/span&gt;&lt;em&gt;scope_test&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;e legarea de&amp;nbsp;&lt;/span&gt;&lt;em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;spam -&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;ului&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/simple_stmts.html#nonlocal&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Nelocal&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;Atribuirea schimbat&amp;nbsp;&lt;/span&gt;&lt;em&gt;scope_test&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;e legarea&amp;nbsp;&lt;/span&gt;&lt;em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;spam -&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;ului&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, iar la&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/simple_stmts.html#global&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;nivel mondial&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;atribuirea schimbat legării la&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;nivel de&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;modul.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De asemenea, puteți vedea că nu a existat nici o obligație anterioară pentru&amp;nbsp;&lt;/span&gt;&lt;em&gt;spam&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;înainte de&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;atribuirea&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/simple_stmts.html#global&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;globală&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;a-first-look-at-classes&quot; style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 16px;&quot;&gt;
&lt;span id=&quot;tut-firstclasses&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h2 style=&quot;border: 0px; color: #1a1a1a; font-size: 25.6px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;9.3.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;O primă privire la clase&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#a-first-look-at-classes&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Clasele introduc un pic de sintaxă nouă, trei tipuri de obiecte noi și câteva semantici noi.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;class-definition-syntax&quot;&gt;
&lt;span id=&quot;tut-classdefinition&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h3 style=&quot;border: 0px; color: #1a1a1a; font-size: 22.4px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;9.3.1.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Sintaxa de definire a clasei&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#class-definition-syntax&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Cea mai simplă formă de definire a clasei arată astfel:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;Clasa de &lt;/span&gt; &lt;span class=&quot;nc&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;ClassName &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
    &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&amp;lt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;declarație &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;- &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&amp;gt; &lt;/span&gt;
    &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;
    &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;
    &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;
    &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&amp;lt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;declarație &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;- &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;N &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Definițiile de clasă, cum ar fi definițiile funcțiilor (&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;declarațiile&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#def&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;def&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;) trebuie executate înainte de a avea vreun efect.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;(Ați putea plasa o definiție de clasă într-o ramură a unei&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;declarații&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#if&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;if&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;sau în interiorul unei funcții.)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În practică, afirmațiile din interiorul unei definiții de clasă vor fi, de obicei, definiții de funcții, dar alte declarații sunt permise și uneori utile - vom reveni la aceasta mai târziu.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Definițiile funcțiilor dintr-o clasă au, în mod normal, o formă specifică de listă de argumente, dictată de convențiile de apel pentru metode - din nou, acest lucru este explicat mai târziu.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Când se introduce o definiție de clasă, se creează un nou spațiu de nume și se utilizează ca domeniu de aplicare local - astfel, toate asignările la variabilele locale intră în acest nou spațiu de nume.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În particular, definițiile funcțiilor leagă numele aici pentru noua funcție.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Atunci când o definiție de clasă este lăsată în mod normal (prin capăt),&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;se creează&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;un&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;obiect de clasă&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acesta este, în principiu, un înveliș în jurul conținutului spațiului de nume creat de definiția clasei;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;vom afla mai multe despre obiectele de clasă în secțiunea următoare.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;S-a restabilit domeniul original original (cel în vigoare imediat înainte de definirea clasei), iar obiectul de clasă este legat aici de numele clasei din antetul de clasă definit (&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;xref py py-class docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;ClassName&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;din exemplu).&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;class-objects&quot;&gt;
&lt;span id=&quot;tut-classobjects&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h3 style=&quot;border: 0px; color: #1a1a1a; font-size: 22.4px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;9.3.2.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Obiecte de clasă&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#class-objects&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Elementele de clasă acceptă două tipuri de operațiuni: referințe de atribute și instanțiere.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;em&gt;Referințele atributelor&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;utilizează sintaxa standard folosită pentru toate referințele atributelor din Python:&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;obj.name&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Numele de atribute valide sunt toate numele care au fost în spațiul de nume al clasei atunci când a fost creat obiectul de clasă.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Deci, dacă definiția clasei arăta astfel:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;clasa &lt;/span&gt; &lt;span class=&quot;nc&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;MyClass &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
    &lt;span class=&quot;sd&quot; style=&quot;color: #4070a0; font-style: italic;&quot;&gt;&quot;&quot; Un exemplu de clasă exemplară &quot;&quot; &quot; &lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;i &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;12345 &lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;def &lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;f &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;self &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
        &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;întoarcere &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot; hello world &quot;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;apoi&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;MyClass.i&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;MyClass.f&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;sunt referințe de atribute valide, returnând un întreg și un obiect de funcție, respectiv.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De asemenea, pot fi atribuite atribute ale clasei, astfel încât să puteți schimba valoarea lui&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;MyClass.i&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;prin alocare.&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;xref py py-attr docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;__doc__&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este, de asemenea, un atribut valabil, returnând docstring aparținând clasei:&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&quot;O&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;clasă de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;exemple&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;simple&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;em&gt;Inițializarea&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;clasei&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;utilizează notația funcției.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Doar pretindeți că obiectul de clasă este o funcție fără parametri care returnează o nouă instanță a clasei.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu (presupunând clasa de mai sus):&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;n&quot;&gt;x &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;MyClass &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;creează o nouă&amp;nbsp;&lt;/span&gt;&lt;em&gt;instanță&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;a clasei și atribuie acest obiect variabilei locale&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;x&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Operația de instanțiere (&quot;apelarea&quot; unui obiect de clasă) creează un obiect gol.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Multe clase le place să creeze obiecte cu instanțe personalizate la o stare inițială specifică.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Prin urmare, o clasă poate defini o metodă specială numită&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/datamodel.html#object.__init__&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;opoziție .__ init__&quot;&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;__init __ ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, după cum urmează:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;def &lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;__init__ &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;auto &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
    &lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;sine &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;date &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[]&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Atunci când o clasă definește o&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/datamodel.html#object.__init__&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;opoziție .__ init__&quot;&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;metodă __init __ ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, instanța de clasă invocă automat&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/datamodel.html#object.__init__&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;opoziție .__ init__&quot;&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;__init __ ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;pentru instanța de clasă nou creată.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Astfel, în acest exemplu, o nouă instanță inițializată poate fi obținută prin:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;n&quot;&gt;x &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;MyClass &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Desigur, metoda&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/datamodel.html#object.__init__&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;opoziție .__ init__&quot;&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;__init __ ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;poate avea argumente pentru o mai mare flexibilitate.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În acest caz, argumentele date operatorului instanței de clasă sunt transmise&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/datamodel.html#object.__init__&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;opoziție .__ init__&quot;&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;__init __ ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu,&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;clasa &lt;/span&gt; &lt;span class=&quot;nc&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;Complex &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;def &lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;__init__ &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;sine &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;realpart &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;imagpart &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;        &lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;sine &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;r &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;realitate &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;        &lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;sine &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;imagpart &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Complex &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mf&quot; style=&quot;color: #208050;&quot;&gt;3.0 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;- &lt;/span&gt;&lt;span class=&quot;mf&quot; style=&quot;color: #208050;&quot;&gt;4.5 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;r &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;(3,0, -4,5)&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;instance-objects&quot;&gt;
&lt;span id=&quot;tut-instanceobjects&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h3 style=&quot;border: 0px; color: #1a1a1a; font-size: 22.4px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;9.3.3.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Obiectele de instanță&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#instance-objects&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acum, ce putem face cu obiectele instanței?&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Singurele operațiuni înțelese de obiectele instanței sunt referințele atributelor.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Există două tipuri de nume de atribute valide, atribute și metode de date.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;em&gt;atributele de date&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;corespund &quot;variabilelor de instanță&quot; din Smalltalk și &quot;membrilor de date&quot; din C ++.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Atribuiile de date nu trebuie să fie declarate;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;cum ar fi variabilele locale, ele apar în momentul în care sunt atribuite pentru prima dată.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu, dacă&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;x&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este instanța&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;xref py py-class docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;MyClass&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;creată mai sus, următoarea bucată de cod va tipări valoarea&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;16&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, fără a lăsa o urmă:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;contra &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 în &lt;/span&gt;
&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;timp ce &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;contra &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&amp;lt; &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;10 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;contra &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;contra &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;* &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;
&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;imprimare &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;contra &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;del &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;tejghea&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Alt tip de referință a atributului de instanță este o&amp;nbsp;&lt;/span&gt;&lt;em&gt;metodă&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;O metodă este o funcție care &quot;aparține&quot; unui obiect.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;(În Python, metoda termenului nu este unică pentru instanțele de clasă: alte tipuri de obiecte pot avea și metode, de exemplu, obiectele din listă au metode numite adăugați, inserați, ștergeți, sortați și așa mai departe.În următoarea discuție, vom folosi metoda termenului exclusiv pentru a înțelege metode ale obiectelor instanței de clasă, cu excepția cazului în care se specifică altfel.)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div id=&quot;index-0&quot; style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Numele de metode valide ale unui obiect de instanță depind de clasa sa.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Prin definiție, toate atributele unei clase care sunt obiecte funcționale definesc metodele corespunzătoare ale instanțelor sale.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Deci, în exemplul nostru,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;xf&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este o referință validă a metodei, deoarece&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;MyClass.f&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este o funcție, dar&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;xi&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;nu este, deoarece&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;MyClass.i&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;nu este.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dar&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;xf&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;nu este același lucru cu&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;MyClass.f&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;- este un&amp;nbsp;&lt;/span&gt;&lt;em&gt;obiect de metodă&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, nu un obiect de funcție.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;method-objects&quot;&gt;
&lt;span id=&quot;tut-methodobjects&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h3 style=&quot;border: 0px; color: #1a1a1a; font-size: 22.4px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;9.3.4.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Metodă Obiecte&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#method-objects&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De obicei, o metodă este chemată imediat după ce este obligată:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;f &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;exemplul&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;xref py py-class docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;MyClass&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, aceasta va returna șirul&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&quot;hello&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;world&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Cu toate acestea, nu este necesar să apelați imediat o metodă:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;xf&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este un obiect de metodă și poate fi stocat și apelat ulterior.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;n&quot;&gt;xf &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;f în &lt;/span&gt;
&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;timp ce &lt;/span&gt; &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;True &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;xf &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;())&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;va continua să tipărească&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;lumea&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;salutului&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;până la sfârșitul timpului.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Ce se întâmplă exact atunci când se numește o metodă?&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Este posibil să fi observat că&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;xf () a&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;fost apelat fără un argument de mai sus, chiar dacă definiția funcției pentru&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;f () a&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;specificat un argument.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Ce sa întâmplat cu argumentul?&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Cu siguranță, Python ridică o excepție atunci când o funcție care necesită un argument este numită fără nici un cuvânt - chiar dacă argumentul nu este utilizat efectiv ...&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De fapt, poate ați ghicit răspunsul: lucrurile speciale despre metode sunt că obiectul este trecut ca primul argument al funcției.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În exemplul nostru, apelul&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;xf ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este exact echivalent cu&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;MyClass.f (x)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În general, apelarea unei metode cu o listă de&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;argumente&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;n&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este echivalentă cu apelarea funcției corespunzătoare cu o listă de argumente care este creată prin introducerea obiectului metodei înaintea primului argument.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă încă nu înțelegeți cum funcționează metodele, o privire la implementarea poate clarifica problemele.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Atunci când un atribut instanță este referit, care nu este un atribut de date, se caută clasa sa.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă numele denumește un atribut de clasă valabil, care este un obiect funcțional, un obiect de metodă este creat prin împachetarea (indicii către) obiectul instanței și obiectul funcției care au fost găsiți împreună într-un obiect abstract: acesta este obiectul metodei.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Atunci când obiectul metodei este numit cu o listă de argumente, se construiește o nouă listă de argumente din obiectul instanță și din lista de argumente, iar obiectul funcțional se numește cu această nouă listă de argumente.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;random-remarks&quot; style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 16px;&quot;&gt;
&lt;span id=&quot;tut-remarks&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h2 style=&quot;border: 0px; color: #1a1a1a; font-size: 25.6px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;9.4.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Alegeri aleatorii&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#random-remarks&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Atributele de date suprascriu atributele metodei cu același nume;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pentru a evita conflictele de nume accidentale, care pot provoca erori greu de găsit în programele mari, este înțelept să folosiți un fel de convenție care să minimizeze șansele de conflicte.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Contractele posibile includ numele de metode de capitalizare, prefixarea numelor de atribute de date cu un șir unic mic (poate doar o subliniere) sau utilizarea verbelor pentru metode și substantive pentru atributele de date.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Atributele de date pot fi menționate prin metode, precum și de către utilizatorii obișnuiți (&quot;clienți&quot;) ai unui obiect.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Cu alte cuvinte, clasele nu sunt utilizabile pentru a pune în aplicare tipuri pure de date abstracte.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De fapt, nimic din Python nu face posibilă ascunderea datelor ascunse - totul se bazează pe convenție.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;(Pe de altă parte, implementarea Python, scrisă în C, poate să ascundă complet detaliile implementării și să controleze accesul la un obiect, dacă este necesar, acesta putând fi folosit de extensiile Python scrise în C.)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Clienții ar trebui să folosească atributele de date cu grijă - clienții pot provoca daune invarianților întreținute de metode prin ștampilarea pe atributele lor de date.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Rețineți că clienții pot adăuga propriile atribute de date unui obiect de instanță fără a afecta valabilitatea metodelor, atâta timp cât sunt evitate conflictele de nume - din nou, o convenție de numire poate salva o mulțime de dureri de cap aici.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Nu există o stenogramă pentru referirea atributelor de date (sau a altor metode!) Din cadrul metodelor.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Consider că acest lucru mărește, de fapt, lizibilitatea metodelor: nu există nicio șansă de a confunda variabilele locale și variabilele de instanță atunci când se uită printr-o metodă.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Adesea, primul argument al unei metode se numește&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sine&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Aceasta nu este altceva decât o convenție: numele de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sine&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;nu are absolut nici un înțeles special pentru Python.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Rețineți însă că, prin nerespectarea convenției, codul dvs. poate fi mai puțin lizibil pentru alți programatori Python și este de asemenea posibil ca un&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;program de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;browser de clasă&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;să poată fi scris care se bazează pe o astfel de convenție.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Orice obiect de funcții care este un atribut de clasă definește o metodă pentru instanțele acelei clase.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Nu este necesar ca definiția funcției să fie inclusă în text în definiția clasei: atribuirea unui obiect funcțional unei variabile locale în clasă este, de asemenea, ok.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# Funcție definită în afara clasei &lt;/span&gt;
&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;def &lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;f1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;auto &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;retur &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;min &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;+ &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;y &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;clasa &lt;/span&gt; &lt;span class=&quot;nc&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;C &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;f &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;f1 &lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;def &lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;g &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;auto &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
        &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;întoarcere &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;hello world&#39; &lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;h &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;g&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acum&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;f&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;,&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;h&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;sunt atribute ale clasei&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;xref py py-class docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;C&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;care se referă la obiectele funcției și, prin urmare, toate metode ale instanțelor&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;xref py py-class docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;C&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;-&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;h&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;sunt exact echivalente cu&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Rețineți că această practică servește, de obicei, doar la confuzarea cititorului unui program.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Metodele pot apela alte metode prin utilizarea atributelor metode ale&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;auto&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;argumentului:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;nc&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;sac de &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;clasă &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;def &lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;__init__ &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;auto &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
        &lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;sine &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;date &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[] &lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;def &lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;adăugați &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;auto &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
        &lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;auto &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;date &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;adăugați &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;def &lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;addtwice &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;auto &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
        &lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;self &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;adăugați &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
        &lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;auto &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;adaugă &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Metodele pot face referire la nume globale în același mod ca și funcțiile obișnuite.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Domeniul de aplicare global asociat unei metode este modulul care conține definiția sa.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;(O clasă nu este niciodată utilizată ca domeniu de aplicare global). În timp ce se întâlnește rareori un motiv bun pentru utilizarea datelor globale într-o metodă, există multe utilizări legitime ale domeniului global: pentru un singur lucru, funcțiile și modulele importate în domeniul global pot să fie utilizate prin metode, precum și funcții și clase definite în acesta.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De obicei, clasa care conține metoda este ea însăși definită în acest domeniu global, iar în următoarea secțiune vom găsi câteva motive bune pentru care o metodă ar dori să se refere la propria clasă.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Fiecare valoare este un obiect și, prin urmare, are o&amp;nbsp;&lt;/span&gt;&lt;em&gt;clasă&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;(de asemenea numită&amp;nbsp;&lt;/span&gt;&lt;em&gt;tipul&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;ei&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Este stocat ca&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;obiect .__ class__&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;inheritance&quot; style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 16px;&quot;&gt;
&lt;span id=&quot;tut-inheritance&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h2 style=&quot;border: 0px; color: #1a1a1a; font-size: 25.6px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;9.5.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Moștenire&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#inheritance&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Bineînțeles, o caracteristică lingvistică nu ar fi demnă de denumirea &quot;clasă&quot; fără a susține moștenirea.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Sintaxa pentru o definiție a clasei derivate arată astfel:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;clasă &lt;/span&gt; &lt;span class=&quot;nc&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;DerivedClassName &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;BaseClassName &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
    &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&amp;lt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;declarație &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;- &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&amp;gt; &lt;/span&gt;
    &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;
    &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;
    &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;
    &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&amp;lt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;declarație &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;- &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;N &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Numele&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;xref py py-class docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;BaseClassName&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;trebuie definit într-un domeniu care conține definiția clasei derivate.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În locul unui nume de clasă de bază, sunt permise și alte expresii arbitrare.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest lucru poate fi util, de exemplu, atunci când clasa de bază este definită într-un alt modul:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;Clasa de clasa &lt;/span&gt; &lt;span class=&quot;nc&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;derivat˘a &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;modname &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;BaseClassName &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Executarea unei definiții de clasă derivată este aceeași ca și pentru o clasă de bază.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Atunci când obiectul de clasă este construit, clasa de bază este amintită.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acesta este folosit pentru rezolvarea referințelor atributului: dacă un atribut solicitat nu este găsit în clasă, căutarea continuă să se uite în clasa de bază.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Această regulă este aplicată recursiv dacă clasa de bază în sine este derivată dintr-o altă clasă.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Nu este nimic special în instanțierea claselor derivate:&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;DerivedClassName ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;creează o nouă instanță a clasei.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Referințele la metodă sunt rezolvate după cum urmează: se caută atributul de clasă corespunzător, coborând în jos lanțul de clase de bază, dacă este necesar, iar referința metodei este validă dacă aceasta dă un obiect de funcție.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Clasele derivate pot depasi metodele din clasele de baza ale acestora.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Deoarece metodele nu au privilegii speciale atunci când apelați alte metode ale aceluiași obiect, o metodă a unei clase de bază care apelează o altă metodă definită în aceeași clasă de bază poate ajunge la a apela o metodă a unei clase derivate care o suprascrie.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;(Pentru programatori C ++: toate metodele din Python sunt efectiv&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;virtuale&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;O metodă suprapusă într-o clasă derivată poate, de fapt, să dorească să se extindă mai degrabă decât să înlocuiască pur și simplu metoda de clasă de bază cu același nume.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Există o modalitate simplă de a apela metoda directă a clasei de bază: trebuie doar să apelați&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;BaseClassName.methodname (auto,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;argumente)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest lucru este uneori util și pentru clienți.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;(Rețineți că acest lucru funcționează numai dacă clasa de bază este accesibilă ca&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;BaseClassName&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;în domeniul global.)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Python are două funcții încorporate care funcționează cu moștenire:&lt;/span&gt;&lt;/div&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Utilizați&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#isinstance&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;isinstance&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;instanța ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;pentru a verifica tipul instanței:&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;isinstance (obj,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;int)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;va fi&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Adevărat&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;numai dacă&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;obj .__ class__&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#int&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;int&quot;&gt;&lt;tt class=&quot;xref py py-class docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;int&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;sau o anumită clasă derivată din&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#int&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;int&quot;&gt;&lt;tt class=&quot;xref py py-class docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;int&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;line-height: 20.8px; text-align: justify;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Utilizați&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#issubclass&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;issubclass&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;issubclass ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;pentru a verifica moștenirea claselor:&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;issubclass (bool,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;int)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;True&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;deoarece&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#bool&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;bool&quot;&gt;&lt;tt class=&quot;xref py py-class docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;bool&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este o subclasă de&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#int&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;int&quot;&gt;&lt;tt class=&quot;xref py py-class docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;int&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Cu toate acestea,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;issubclass (float,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;int)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;este&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;False,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;deoarece&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#float&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;pluti&quot;&gt;&lt;tt class=&quot;xref py py-class docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;float&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;nu este o subclasă de&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#int&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;int&quot;&gt;&lt;tt class=&quot;xref py py-class docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;int&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;section&quot; id=&quot;multiple-inheritance&quot;&gt;
&lt;span id=&quot;tut-multiple&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h3 style=&quot;border: 0px; color: #1a1a1a; font-size: 22.4px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;9.5.1.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Moștenire multiplă&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#multiple-inheritance&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Python susține și o formă de moștenire multiplă.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;O definiție de clasă cu mai multe clase de bază arată astfel:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;clasa &lt;/span&gt; &lt;span class=&quot;nc&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;DerivedClassName &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Base1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Base2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Base3 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
    &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&amp;lt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;declarație &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;- &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&amp;gt; &lt;/span&gt;
    &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;
    &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;
    &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;
    &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&amp;lt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;declarație &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;- &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;N &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În cele mai multe scopuri, în cele mai simple cazuri, vă puteți gândi la căutarea atributelor moștenite de la o clasă părinte ca adâncime în primul rând, de la stânga la dreapta, fără a căuta de două ori în aceeași clasă în care există o suprapunere în ierarhie.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Astfel, dacă un atribut nu este găsit în&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;xref py py-class docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;DerivedClassName&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, acesta este căutat în&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;xref py py-class docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Base1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, apoi (recursiv) în clasele de bază ale&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;xref py py-class docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Base1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și, dacă nu a fost găsit acolo, a fost căutat în&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;xref py py-class docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Base2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și așa mai departe.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De fapt, este puțin mai complexă decât asta;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;ordinea de rezoluție a metodei se modifică dinamic pentru a sprijini apelurile de tip cooperativ către&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#super&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;super&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;super ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Această abordare este cunoscută în alte limbi cu mai multe moșteniri ca metodă call-next și este mai puternică decât super-apelul găsit în limbi de mostenire singulară.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Ordonarea dinamică este necesară deoarece toate cazurile de moștenire multiplă prezintă una sau mai multe relații diamante (în cazul în care cel puțin una dintre clasele părinte poate fi accesată prin mai multe căi din clasa inferioară).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu, toate clasele moștenesc de la&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#object&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;obiect&quot;&gt;&lt;tt class=&quot;xref py py-class docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;obiect&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, astfel încât orice caz de moștenire multiplă oferă mai mult de o cale pentru a ajunge la&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#object&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;obiect&quot;&gt;&lt;tt class=&quot;xref py py-class docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;obiect&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pentru a păstra clasele de bază accesate de mai multe ori, algoritmul dinamic linearizează ordinea de căutare într-un mod care păstrează ordonarea de la stânga la dreapta specificată în fiecare clasă, care apelează fiecare părinte o singură dată și este monotonică o clasă poate fi subclasată fără a afecta ordinea de prioritate a părinților săi).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Luate împreună, aceste proprietăți fac posibilă proiectarea unor clase fiabile și extensibile cu moștenire multiplă.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pentru mai multe detalii, consultați&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference external&quot; href=&quot;http://www.python.org/download/releases/2.3/mro/&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;http://www.python.org/download/releases/2.3/mro/&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;private-variables&quot; style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 16px;&quot;&gt;
&lt;span id=&quot;tut-private&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h2 style=&quot;border: 0px; color: #1a1a1a; font-size: 25.6px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;9.6.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Variabile private&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#private-variables&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Variabilele de instanță &quot;private&quot; care nu pot fi accesate decât în ​​interiorul unui obiect nu există în Python.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Cu toate acestea, există o convenție care este urmată de majoritatea codului Python: un nume prefixat cu o subliniere (de exemplu,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;_spam&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;) trebuie tratat ca o parte non-publică a API-ului (indiferent dacă este vorba despre o funcție, o metodă sau un membru de date) .&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Ar trebui să fie considerat un detaliu al implementării și să se schimbe fără notificare.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Deoarece există un caz de utilizare valabil pentru membrii de clasă privat (și anume pentru a evita ciocnirile de nume cu nume definite de subclase), există un sprijin limitat pentru un astfel de mecanism numit&amp;nbsp;&lt;/span&gt;&lt;em class=&quot;dfn&quot;&gt;mangling nume&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Orice identificator al formularului&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;__spam&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;(cel puțin două subliniere de frunte, cel mult un subliniere&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;finală&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;) este înlocuit textual cu&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;_classname__spam&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, unde&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;classname&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este numele curent al clasei cu underscorele principale&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;dezbatete&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest mangling se face fără să se țină cont de poziția sintactică a identificatorului, atâta timp cât apare în definiția unei clase.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Numele mangling este util pentru a permite subclasele să înlocuiască metodele fără a rupe apelurile prin metoda intraclass.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;Clasa de &lt;/span&gt; &lt;span class=&quot;nc&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;cartografiere &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;def &lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;__init__ &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;auto &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;iterable &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): de &lt;/span&gt;
        &lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;sine &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;items_list &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[] &lt;/span&gt;
        &lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;singur &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;__update &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;iterabil &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;def &lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;update &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;auto &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;iterabil &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
        &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;element &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;iterabil &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
            &lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;auto &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;items_list &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;adăugați &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;element &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

    &lt;span class=&quot;n&quot;&gt;__update &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;actualizare &lt;/span&gt;   &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# copie privată a metodei original update ()&lt;/span&gt;

&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;class &lt;/span&gt; &lt;span class=&quot;nc&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;MappingSubclass &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Mapping &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;

    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;def &lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;actualizare &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;auto &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;chei &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;valori &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
        &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# furnizează o nouă semnătură pentru actualizare () &lt;/span&gt;
        &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# dar nu rupe __init __ () &lt;/span&gt;
        &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;elementul &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;din &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;zip &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;chei &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;valori &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
            &lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;self &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;items_list &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;adăugați &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;element &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Rețineți că regulile de mangling sunt concepute în principal pentru a evita accidentele;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;este încă posibil să accesați sau să modificați o variabilă considerată privată.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest lucru poate fi util chiar și în circumstanțe speciale, cum ar fi în programul de depanare.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Observați că codul trecut la&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;exec ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;sau&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;eval ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;nu consideră că clasa clasei invocate este clasa curentă;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;acest lucru este similar cu efectul&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;instrucțiunii&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;globale&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, efectul căruia este limitat la codul care este compilat împreună.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Aceeași restricție se aplică și pentru&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;getattr ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;,&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;setattr ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;delattr ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, precum și când se face referire&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;directă&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;__dict__&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;odds-and-ends&quot; style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 16px;&quot;&gt;
&lt;span id=&quot;tut-odds&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h2 style=&quot;border: 0px; color: #1a1a1a; font-size: 25.6px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;9.7.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Cote și sfârșituri&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#odds-and-ends&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Uneori este util să aveți un tip de date similar cu &quot;înregistrarea&quot; Pascal sau C &quot;struct&quot;, grupând împreună câteva elemente de date numite.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;O definiție a clasei goale va face bine:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;clasa &lt;/span&gt; &lt;span class=&quot;nc&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;angajat &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;treci&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;john &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Angajat &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;() &lt;/span&gt; &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# Creați o înregistrare a angajatului gol&lt;/span&gt;

&lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# Umpleți câmpurile &lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;john-ului de &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;înregistrare &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;nume &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;John Doe&#39; &lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;john &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dept &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;computer lab&#39; &lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;john &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;salariu &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1000&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;O bucată de cod Python care așteaptă un anumit tip de date abstract poate fi adesea trecută de o clasă care emulează în schimb metodele acelui tip de date.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu, dacă aveți o funcție care formatează anumite date dintr-un obiect de fișier, puteți defini o clasă cu metode&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;read ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;readline ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;care obțin datele dintr-un tampon șir și o transmit ca un argument.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Metoda instanței are și atribute:&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;m .__ self__&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este obiectul instanței cu metoda&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;m ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, iar&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;m .__ func__&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este obiectul funcției corespunzător metodei.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;exceptions-are-classes-too&quot; style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 16px;&quot;&gt;
&lt;span id=&quot;tut-exceptionclasses&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h2 style=&quot;border: 0px; color: #1a1a1a; font-size: 25.6px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;9.8.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Excepțiile sunt prea&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#exceptions-are-classes-too&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Excepțiile definite de utilizator sunt identificate și pe clase.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Folosind acest mecanism este posibil să se creeze ierarhii extensibile de excepții.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Există două noi forme valide (semantice) pentru&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;instrucțiunea de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/simple_stmts.html#raise&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;creare&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;ridica &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;clasa&lt;/span&gt;

&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;ridicați &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;instanța&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În prima formă,&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;clasa&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;trebuie să fie o instanță de&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#type&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;tip&quot;&gt;&lt;tt class=&quot;xref py py-class docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;tip&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;sau de o clasă derivată din ea.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Prima formă este o stenogramă pentru:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;ridica &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Clasa &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;O clasă în&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#except&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;afară&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;de clauză este compatibilă cu o excepție în&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;cazul în&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;care este aceeași clasă sau o clasă de&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;bază ale acestora (dar nu și&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;invers - o clauză cu&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;excepția listarea o clasă derivată nu este compatibilă cu o clasă de&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;bază).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu, următorul cod va imprima B, C, D în ordinea următoare:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;clasa &lt;/span&gt; &lt;span class=&quot;nc&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;B &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;ne&quot; style=&quot;color: #007020;&quot;&gt;excepție &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;treceți &lt;/span&gt;
&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;clasa &lt;/span&gt; &lt;span class=&quot;nc&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;C &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;B &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;treceți &lt;/span&gt;
&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;clasa &lt;/span&gt; &lt;span class=&quot;nc&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;D &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;C &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;treceți&lt;/span&gt;

&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cls &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;B &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;C &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;D &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]: &lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;incercati &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
        &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;ridica &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cls &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;() cu &lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;excepția &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;D &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
        &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;D&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) , cu &lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;excepția &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;C &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
        &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;C&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) cu &lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;excepția &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;B &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
        &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;B&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Rețineți că dacă clauzele excepționale au fost inversate (cu&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;excepția lui&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;B în&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;prealabil), ar fi imprimat B, B, B - prima potrivire cu excepția clauzei este declanșată.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Când se imprimă un mesaj de eroare pentru o excepție nefolosită, este imprimat numele clasei excepției, apoi un punct și un spațiu, iar în final instanța a fost convertită la un șir folosind funcția built-in&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/stdtypes.html#str&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;str&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;str ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;iterators&quot; style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 16px;&quot;&gt;
&lt;span id=&quot;tut-iterators&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h2 style=&quot;border: 0px; color: #1a1a1a; font-size: 25.6px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;9.9.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Iteratori&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#iterators&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Până acum ați observat probabil că majoritatea obiectelor container pot fi bucle cu ajutorul unei&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;instrucțiuni&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#for&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pentru&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;elementul &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;din &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;3 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]: &lt;/span&gt;
    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;elementul &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;elementul &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;din &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;3 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;elementul &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cheie &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{ &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;one&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;doi&#39; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}: &lt;/span&gt;
    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cheie &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;char &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;123&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;char &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;linie&lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;deschis &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;myfile.txt&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;linie &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest stil de acces este clar, concis și convenabil.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Utilizarea iteratoarelor pătrunde și unifică Python.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În spatele scenei,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;instrucțiunea&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#for&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;for&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;solicită&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#iter&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;iter&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;iter ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;pe obiectul containerului.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Funcția returnează un obiect iterator care definește metoda&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/stdtypes.html#iterator.__next__&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;iterator .__ next__&quot;&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;__next __ ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;care accesează elementele din container unul câte unul.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Atunci când nu există mai multe elemente,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/stdtypes.html#iterator.__next__&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;iterator .__ next__&quot;&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;__ __next ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;ridică o&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/exceptions.html#StopIteration&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;StopIteration&quot;&gt;&lt;tt class=&quot;xref py py-exc docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;StopIteration&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;excepție care spune&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/compound_stmts.html#for&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pentru&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;bucla de&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;a termina.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Puteți apela metoda&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/stdtypes.html#iterator.__next__&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;iterator .__ next__&quot;&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;__next __ ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;folosind&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#next&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;Următor →&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;următoarea () funcție&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;încorporată;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;acest exemplu arată cum funcționează toate:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;in ? &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;următorul &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;( &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;it &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;) &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;gr&quot; style=&quot;color: red;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;StopIteration&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;gt&quot; style=&quot;color: #0044dd;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;m&quot; style=&quot;color: #208050;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;gr&quot; style=&quot;color: red;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;După ce am văzut mecanica din spatele protocolului iterator, este ușor să adăugați comportamentul iterator la clasele tale.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Definiți o&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/datamodel.html#object.__iter__&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;opoziție .__ iter__&quot;&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;metodă __iter __ ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;care returnează un obiect cu o&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/stdtypes.html#iterator.__next__&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;iterator .__ next__&quot;&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;metodă __next __ ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă clasa definește&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;__next __ ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, atunci&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/datamodel.html#object.__iter__&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;opoziție .__ iter__&quot;&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;__iter __ () se&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;poate întoarce&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;singură&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;clasa &lt;/span&gt; &lt;span class=&quot;nc&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;inversă &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
    &lt;span class=&quot;sd&quot; style=&quot;color: #4070a0; font-style: italic;&quot;&gt;&quot;&quot; &quot;Iterator pentru reluarea unei secvențe înapoi.&quot; &quot; &lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;def &lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;__init__ &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;sine &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;date &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
        &lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;sine &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;date &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;date de &lt;/span&gt;
        &lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;sine &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;index &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;len &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;date &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;def &lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;__iter__ &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;auto &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
        &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;întoarcere &lt;/span&gt; &lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;self &lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;def &lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;__next__ &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;auto &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
        &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;dacă &lt;/span&gt; &lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;ești &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;singur &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;index &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;== &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;0 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
            &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;ridicați &lt;/span&gt; &lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;Auto &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;ne&quot; style=&quot;color: #007020;&quot;&gt;StopIteration &lt;/span&gt;
        &lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;index &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;=&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;de sine &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;index &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;- &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;
        &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;întoarcerea de &lt;/span&gt; &lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;sine &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;date &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;color: #007020;&quot;&gt;auto &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;index &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;rev &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Reverse &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;spam &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;iter &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;rev &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&amp;lt;__ principal __ Obiect invers la 0x00A1DB50&amp;gt; &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;char &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;in &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;rev &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;: &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;char &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;m &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;a &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;p &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;s&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;generators&quot; style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 16px;&quot;&gt;
&lt;span id=&quot;tut-generators&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h2 style=&quot;border: 0px; color: #1a1a1a; font-size: 25.6px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;9.10.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Generatoare&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#generators&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/glossary.html#term-generator&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;em class=&quot;xref std std-term&quot;&gt;Generatoarele&lt;/em&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;sunt un instrument simplu și puternic pentru crearea iteratorilor.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Ele sunt scrise ca funcții obișnuite, dar utilizează&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;instrucțiunea de&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/simple_stmts.html#yield&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot;&gt;&lt;tt class=&quot;xref std std-keyword docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;randament&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;ori de câte ori doresc să returneze date.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De fiecare dată când&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;se cheamă&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/functions.html#next&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;Următor →&quot;&gt;&lt;tt class=&quot;xref py py-func docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;următorul ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, generatorul revine la locul unde a rămas (își amintește toate valorile datelor și care a fost executată ultima dată).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Un exemplu arată că generatoarele pot fi ușor de creat:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;Definiție &lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #06287e;&quot;&gt;inversă &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;date &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;indexul &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;din &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;intervalul &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;len &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;date &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;- &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;- &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;- &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
        &lt;span style=&quot;vertical-align: inherit;&quot;&gt;date privind &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;randamentul &lt;/span&gt; &lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;[ &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;index &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;char &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;in &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;reverse &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&quot;golf&quot; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;): &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;char &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;... &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;f &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;l &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;o &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;g&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Orice lucru care se poate face cu generatoarele se poate face, de asemenea, cu iteratori de clasă, așa cum este descris în secțiunea anterioară.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Ceea ce face generatoarele atât de compacte este că&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/datamodel.html#object.__iter__&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;opoziție .__ iter__&quot;&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;metodele __iter __ ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/reference/expressions.html#generator.__next__&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;Generator .__ next__&quot;&gt;&lt;tt class=&quot;xref py py-meth docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;__next __ ()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;sunt create automat.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;O altă caracteristică cheie este aceea că variabilele locale și starea de execuție sunt salvate automat între apeluri.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest lucru a făcut ca funcția să fie mai ușor de scris și mult mai clară decât o abordare folosind variabile de exemplu, cum ar fi&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;self.index&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;auto.data&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În plus față de crearea automată a metodei și de salvarea stării programului, atunci când generatoarele termină, ele cresc automat&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference internal&quot; href=&quot;https://docs.python.org/3.3/library/exceptions.html#StopIteration&quot; style=&quot;color: #30306f; text-decoration-line: none;&quot; title=&quot;StopIteration&quot;&gt;&lt;tt class=&quot;xref py py-exc docutils literal&quot; style=&quot;background-color: transparent; border-radius: 3px; font-family: monospace, sans-serif; font-size: 15.44px; padding: 0px 1px;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;StopIteration&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În combinație, aceste caracteristici ușurează crearea iteratorilor fără efort mai mult decât scrierea unei funcții obișnuite.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;generator-expressions&quot; style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 16px;&quot;&gt;
&lt;span id=&quot;tut-genexps&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h2 style=&quot;border: 0px; color: #1a1a1a; font-size: 25.6px; font-weight: normal; margin: 0px; padding: 0.3em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;9.11.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Expresii generatoare&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;headerlink&quot; href=&quot;https://docs.python.org/3.3/tutorial/classes.html#generator-expressions&quot; style=&quot;color: #30306f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink la acest titlu&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Unele generatoare simple pot fi codificate succint ca expresii utilizând o sintaxă similară înțelegerii listei, dar cu paranteze în loc de paranteze.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Aceste expresii sunt concepute pentru situațiile în care generatorul este utilizat imediat printr-o funcție de închidere.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Expresiile generatoare sunt mai compacte, dar mai puțin versatile decât definițiile complete ale generatoarelor și tind să fie mai prietenoase față de memorie decât comprehensiunea echivalentă a listelor.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Exemple:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-python3&quot; style=&quot;position: relative;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background: rgb(238, 255, 204);&quot;&gt;
&lt;span class=&quot;copybutton&quot; style=&quot;border-color: rgb(170, 204, 153); border-radius: 0px 3px 0px 0px; border-style: solid; border-width: 1px; color: #aacc99; cursor: pointer; font-family: monospace; padding-left: 0.2em; padding-right: 0.2em; position: absolute; right: 0px; top: 0px;&quot; title=&quot;Ascundeți solicitările și ieșirile&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;border-radius: 3px; border: 1px solid rgb(170, 204, 153); color: #333333; font-family: monospace, sans-serif; font-size: 15.44px; line-height: 18.528px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 5px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;suma &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;* &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i &lt;/span&gt; &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;i &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;intervalul &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;10 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)) &lt;/span&gt;                 &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;# suma pătratelor &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;285&lt;/span&gt;

&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;xvec &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;10 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;20 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;30 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;yvec &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;7 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;5 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;3 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;sum &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;* &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;y &lt;/span&gt; &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;y &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;zip &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;xvec &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;yvec &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)) &lt;/span&gt;         &lt;span class=&quot;c&quot; style=&quot;color: #408090; font-style: italic;&quot;&gt;produs # dot &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;260&lt;/span&gt;

&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; de &lt;/span&gt;&lt;span class=&quot;kn&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;la &lt;/span&gt; &lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;importul de &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;nn&quot; style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;matematică &lt;/span&gt; &lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pi &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;, &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sin &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sine_table &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;= &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;{ &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;x &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;: &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sin &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;( &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;x &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;* &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pi &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;/ &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;180 &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;) &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pentru &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;x &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;în &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;intervalul &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;( &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;0 &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;, &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;91 &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;)}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;

&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;unique_words &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;set &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cuvânt &lt;/span&gt;  &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;linie &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pagină &lt;/span&gt;  &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cuvânt &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;rândul &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;split &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;())&lt;/span&gt;

&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;valedictorian &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;max &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;elev &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;APG &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;elev &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Nume &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt; &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;student de &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;la &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;absolvenți &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;data &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;= &lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #4070a0;&quot;&gt;&#39;golf &lt;/span&gt;
&lt;span class=&quot;gp&quot; style=&quot;color: #c65d09; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;lista &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;date &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[ &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;] &lt;/span&gt; &lt;span class=&quot;k&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;pentru &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;i &lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;color: #007020; font-weight: bold;&quot;&gt;în &lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;intervalul &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;color: #007020;&quot;&gt;len &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;( &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;data &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;) &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;- &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;- &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;, &lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;color: #666666;&quot;&gt;- &lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #208050;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)) &lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;[&#39; f &#39;,&#39; g &#39;]&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 22.4px; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;a href=&quot;https://docs.python.org/3.3/tutorial/classes.html&quot;&gt;https://docs.python.org/3.3/tutorial/classes.html&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;section&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; white-space: normal;&quot;&gt;
&lt;div class=&quot;section&quot;&gt;
&lt;h2 style=&quot;color: #212324; font-size: 24px; font-weight: normal;&quot;&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/null&quot; id=&quot;compatibility&quot; name=&quot;compatibility&quot;&gt;Compatibilitate&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;color: blue; vertical-align: inherit;&quot;&gt;&lt;b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Python 3.0 va rupe compatibilitatea înapoi.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Intru totul.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Nici măcar nu țintim pentru un anumit subset comun.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;(Desigur, va exista un subset comun, probabil destul de mare, dar nu vrem să facem convenabil sau chiar posibil să scriem programe semnificative în acest subset. Este doar un set de trăsături care se întâmplă neschimbate de la 2.6 la 3.0.)&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;color: blue; vertical-align: inherit;&quot;&gt;&lt;b&gt;Python 2.6, pe de altă parte, va menține compatibilitatea completă cu Python 2.5 (și versiunile anterioare, în măsura posibilităților), dar va sprijini și compatibilitatea în viitor, în următoarele moduri:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ul class=&quot;simple&quot; style=&quot;color: #212324;&quot;&gt;&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Python 2.6 va suporta un &quot;modul de avertismente Py3k&quot; care va avertiza dinamic (adica la runtime) despre functiile care vor inceta sa lucreze in Python 3.0, de exemplu presupunand ca range () returneaza o lista.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Python 2.6 va conține versiuni suportate ale mai multor funcții Py3k, fie activate prin instrucțiuni __future__, fie pur și simplu permițând utilizarea sintaxei vechi și noi una lângă cealaltă (dacă noua sintaxă ar fi o eroare de sintaxă în 2.5).&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În plus față de caracteristicile de compatibilitate pentru versiunea 2.6, va exista un instrument separat de&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference&quot; href=&quot;http://svn.python.org/view/sandbox/trunk/2to3/&quot; style=&quot;color: purple; text-decoration-line: none;&quot;&gt;conversie a codului sursă&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest instrument poate face o traducere sursă-sursă fără context.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Ca exemplu (foarte simplu), se poate traduce&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;aplicarea (f,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;args)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;în&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;f (* args)&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Cu toate acestea, instrumentul nu poate efectua analiza fluxului de date sau tiparea inferențelor, deci presupune pur și simplu că&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;aplica&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;în acest exemplu se referă la funcția veche încorporată.&lt;/span&gt;&lt;/li&gt;
&lt;/span&gt;&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; style=&quot;color: #212324;&quot;&gt;
&lt;h2 style=&quot;font-size: 24px; font-weight: normal;&quot;&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/null&quot; id=&quot;transitional-development&quot; name=&quot;transitional-development&quot;&gt;Dezvoltare tranzitorie&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Modelul de dezvoltare recomandat pentru un proiect care trebuie să sprijine simultan Python 2.6 și 3.0 este următorul:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ol class=&quot;arabic simple&quot; start=&quot;0&quot;&gt;&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Începeți cu teste excelente de unitate, în mod ideal aproape de acoperire completă.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Portați proiectul către Python 2.6.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Activați modul avertizări Py3k.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Testați și editați până când nu mai există avertismente.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Utilizați instrumentul 2to3 pentru a converti acest cod sursă în sintaxa 3.0.&amp;nbsp;&lt;/span&gt;&lt;strong&gt;Nu modificați manual ieșirea!&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Testați codul sursă convertit sub 3.0.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă găsiți probleme, faceți corecții la&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;versiunea&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;strong&gt;2.6&lt;/strong&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;a codului sursă și reveniți la pasul 3.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Când este timpul să lansați, lansați separat 2.6 și 3.0 tarballs (sau orice formă de arhivă pe care o utilizați pentru lansări).&lt;/span&gt;&lt;/li&gt;
&lt;/span&gt;&lt;/ol&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Instrumentul de conversie produce cod sursă de înaltă calitate, care, în multe cazuri, nu poate fi distins de codul convertit manual.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Cu toate acestea, este&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;strong&gt;puternic&lt;/strong&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;recomandat să&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;nu pentru a începe editarea codului sursă 3.0 până când sunteți gata pentru a reduce sprijin 2.6 la întreținere pură (adică momentul în&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;care v -&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;ar muta în&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;mod normal ,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;codul 2.6 la o ramură de&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;întreținere ,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;oricum).&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pasul (1) este de așteptat să ia efortul obișnuit de a porta orice proiect într-o nouă versiune Python.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Încercăm să facem tranziția de la 2,5 la 2,6 cât mai lină posibil.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă instrumentele de conversie și funcțiile de compatibilitate în Python 2.6 funcționează conform așteptărilor, pașii (2) până la (6) nu ar trebui să depună mult mai mult efort decât trecerea tipică de la Python 2.x la 2. (x + 1).&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;section&quot; style=&quot;color: #212324; font-family: Arial, Helvetica, sans-serif; white-space: normal;&quot;&gt;
&lt;h1 style=&quot;font-size: 28px; font-weight: normal;&quot;&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/null&quot; id=&quot;status-of-individual-features&quot; name=&quot;status-of-individual-features&quot;&gt;Starea caracteristicilor individuale&lt;/a&gt;&lt;/span&gt;&lt;/h1&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Există prea multe modificări pentru a le prezenta pe toate;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;în schimb, mă voi referi la PEP.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Cu toate acestea, aș dori să evidențiez o serie de caracteristici pe care le consider semnificative sau care se așteaptă să fie de interes deosebit sau controversate.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;section&quot;&gt;
&lt;h2 style=&quot;font-size: 24px; font-weight: normal;&quot;&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/null&quot; id=&quot;unicode-codecs-and-i-o&quot; name=&quot;unicode-codecs-and-i-o&quot;&gt;Unicode, codecuri și I / O&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Trecem la un model cunoscut din Java: (imutabile) șiruri de text sunt Unicode, iar datele binare sunt reprezentate de un tip de date separat &quot;bytes&quot;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În plus, parserul va fi mai prietenos cu Unicode: codarea sursă implicită va fi UTF-8, iar literele non-ASCII pot fi utilizate în identificatori.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Există încă o dezbatere despre normalizare, alfabete specifice și dacă putem susține în mod rezonabil scripturi de la dreapta la stânga.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Cu toate acestea, biblioteca standard va continua să utilizeze ASCII numai pentru identificatori și va limita utilizarea non-ASCII în comentarii și literali de șir la testele unității pentru unele dintre caracteristicile Unicode și numele autorilor.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Vom folosi&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;&quot;...&quot;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;sau&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;&quot;...&quot;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;interschimbabil pentru literalurile Unicode, iar&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;b &quot;...&quot;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;sau&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;b &quot;...&quot;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;pentru literali octeți.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De exemplu,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;b&#39;abc &quot;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este echivalent cu crearea unui obiect octet folosind&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;octeții de&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;expresie&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;([97,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;98,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;99])&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Adoptăm o abordare puțin diferită a codecurilor: în timp ce în Python 2, codec-urile pot accepta fie unicode, fie 8-biți ca intrare și produc fie ca ieșire, în Py3k, codarea este întotdeauna o traducere dintr-un șir Unicode (text) de octeți, iar decodificarea merge întotdeauna în direcția opusă.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Aceasta înseamnă că a trebuit să renunțăm la câteva codecuri care nu se încadrează în acest model, de exemplu, rot13, base64 și bz2 (aceste conversii sunt încă acceptate, doar prin API-ul de codare / decodare).&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;section&quot;&gt;
&lt;h3 style=&quot;font-size: 20px; font-weight: normal;&quot;&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/null&quot; id=&quot;new-i-o-library&quot; name=&quot;new-i-o-library&quot;&gt;Noua bibliotecă I / O&lt;/a&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Biblioteca I / O se modifică și ca răspuns la aceste modificări.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Am vrut să o rescriu oricum, pentru a elimina dependența de biblioteca C stdio.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Noua distincție între octeți și șiruri de text a necesitat o modificare (subtilă) a API, iar cele două proiecte au fost realizate mână în mână.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În noua bibliotecă există o distincție clară între fluxurile binare (deschise cu un mod ca &quot;rb&quot; sau &quot;wb&quot;) și fluxurile de text (deschise cu un mod care nu conține &quot;b&quot;).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Fluxurile de text au un atribut nou, codificarea, care poate fi setată explicit când fluxul este deschis;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;dacă nu este specificată nicio codificare, este utilizată o implicită specifică sistemului (care ar putea folosi ghicitul atunci când se deschide un fișier existent).&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Operațiile de citire a fluxurilor binare returnează arhivele de octeți, în timp ce operațiile de citire a fluxurilor de text returnează (Unicode) șirurile de text;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;și similare pentru operațiile de scriere.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Scrierea unui șir de text într-un flux binar sau într-un tablou de octeți într-un flux de text va ridica o excepție.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În caz contrar, API-ul este păstrat destul de compatibil.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În timp ce există încă o&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;funcție&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;deschisă ()&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;încorporată, definiția completă a noii biblioteci I / O este disponibilă din noul&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;modul&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;io&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest modul conține, de asemenea, clase de bază abstracte (vezi mai jos) pentru diferitele tipuri de fluxuri, o nouă implementare a StringIO și o nouă clasă similară BytesIO, care este asemănătoare cu StringIO, dar implementează un flux binar, deci citirea și scrierea arhivelor bytes.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;section&quot;&gt;
&lt;h3 style=&quot;font-size: 20px; font-weight: normal;&quot;&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/null&quot; id=&quot;printing-and-formatting&quot; name=&quot;printing-and-formatting&quot;&gt;Imprimarea și formatarea&lt;/a&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Două alte caracteristici legate de I / O:&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;declarația de&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;venerabil de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;imprimare&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;devine acum o funcție&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;print ()&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, iar&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;operatorul de formatare de șir&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;quirky&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;%&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;va fi înlocuit cu o nouă&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;metodă&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;format ()&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;pe obiecte șir.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Transformarea&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;tipăririi&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;într-o funcție face ca unele ochi să se rotească.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Cu toate acestea, există mai multe avantaje: este mult mai ușor de cod refactor folosind&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;funcțiile&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;print ()&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;pentru a utiliza, de exemplu, pachetul de înregistrare;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;iar&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sintaxa de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;tipărire a&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;fost întotdeauna un pic controversată, cu&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;fișierul&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;său&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și semantica unică pentru o virgulă de la sfârșit.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Argumentele pentru cuvinte cheie preiau aceste roluri și totul este bine.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În mod similar, noua&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;metodă&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;format ()&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;evită unele dintre capcanele vechiului&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;operator&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;%&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, în special comportamentul surprinzător al&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&quot;% s&quot;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;%&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;x&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;atunci când x este o tuplă și greseala obișnuită de a părăsi accidental ultimul &quot; s &#39;în&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;% (nume) s&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Noile șiruri de format folosesc&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;{0},&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;{1},&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;{2},&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;...&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;pentru a face referire la argumentele poziționării pentru metoda&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;format ()&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;{a},&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;{b},&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;...&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;pentru a referenția argumentele cuvintelor cheie.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Alte caracteristici includ {abc} pentru referințele atributelor și chiar {a [b]} pentru cartografiere sau accesare secvență.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Lungimile câmpului pot fi specificate astfel:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;{a: 8}&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;această notație sprijină, de asemenea, transmiterea altor opțiuni de formatare.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Metoda format () este extensibilă într-o varietate de dimensiuni: prin definirea unei&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;metode speciale&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;__format __ ()&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, tipurile de date pot înlocui modul în care sunt formatate și modul în care sunt interpretați parametrii de formatare;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;puteți crea, de asemenea, clase personalizate de formatare, care pot fi utilizate, de exemplu, pentru a furniza automat variabilele locale ca parametri pentru operațiile de formatare.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot;&gt;
&lt;h2 style=&quot;font-size: 24px; font-weight: normal;&quot;&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/null&quot; id=&quot;changes-to-the-class-and-type-system&quot; name=&quot;changes-to-the-class-and-type-system&quot;&gt;Modificări ale sistemului de clasă și tip&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;S-ar putea să fi ghicit că &quot;clasele clasice&quot; mănâncă în sfârșit praful.&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;Obiectul&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;clasa încorporat&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;este clasa de bază implicită pentru clasele noi.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest lucru face loc pentru o varietate de caracteristici noi.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;
&lt;li&gt;&lt;div class=&quot;first&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Clasic decoratori.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acestea funcționează la fel ca decoratorii de funcții:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;pre class=&quot;literal-block&quot; style=&quot;font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.88em;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;@art_deco&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
clasa C:&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
    ...&lt;/span&gt;
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div class=&quot;first&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Semnăturile de funcții și metode pot fi acum &quot;adnotate&quot;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Limba de bază nu atribuie niciun sens acestor adnotări (altele decât punerea la dispoziție pentru introspecție), dar unele module standard de bibliotecă pot face acest lucru;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;de exemplu, funcțiile generice (vedeți mai jos) pot folosi aceste funcții.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Sintaxa este ușor de citit:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;pre class=&quot;literal-block&quot; style=&quot;font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.88em;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;def foobar (a: Integer, b: Secvență) -&amp;gt; String:&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
    ...&lt;/span&gt;
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div class=&quot;first&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Sintaxă de metaclaz nouă.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În loc să setați o variabilă&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;__metaclass__&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;în corpul unei clase, acum trebuie să specificați metaclase folosind un parametru de cuvânt cheie în poziția de clasă, de exemplu:&lt;/span&gt;&lt;/div&gt;
&lt;pre class=&quot;literal-block&quot; style=&quot;font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.88em;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;clasa C (baze, metaclass = MyMeta):&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
    ...&lt;/span&gt;
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div class=&quot;first&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dicționare clasa personalizată.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;dacă metaclasa definește o&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;metodă __prepare __ ()&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, va fi apelată înainte de a intra în corpul clasei și orice va reveni va fi folosit în locul unui dicționar standard ca spațiu de nume în care este executat corpul clasei.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest lucru poate fi folosit, printre altele, pentru a implementa un tip &quot;struct&quot; unde ordinea în care elementele sunt definite este semnificativă.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div class=&quot;first&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Puteți specifica bazele în mod dinamic, de exemplu:&lt;/span&gt;&lt;/div&gt;
&lt;pre class=&quot;literal-block&quot; style=&quot;font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.88em;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;baze = (B1, B2)&lt;/span&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
clasa C (* baze):&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
    ...&lt;/span&gt;
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div class=&quot;first&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Alți parametri de cuvinte cheie sunt, de asemenea, permise în poziția de clasă;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;acestea sunt transmise metodei &quot;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;__new__&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;metaclass&quot;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div class=&quot;first&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Aveți posibilitatea să înlocuiți&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;testele isinstance ()&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;issubclass ()&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, definind metode de clasă numite&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;__instancecheck __ ()&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;sau&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;__subclasscheck __ ()&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, respectiv.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Atunci când acestea sunt definite,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;instanța (x,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;C)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este echivalentă cu&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;C .__ instancecheck __ (x)&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;issubclass (D,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;C)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;cu&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;C .__ subclasscheck __ (D)&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div class=&quot;first&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Clasele de bază abstracte de bază (ABC).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă doriți să definiți o clasă ale cărei instanțe se comportă ca o cartografiere (de exemplu), puteți&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;moșteni în&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;mod voluntar&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;din clasa&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;abc.Mapping&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pe de o&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;parte, această clasă oferă un&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;comportament util mix-in, înlocuind majoritatea funcționalității vechilor&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;UserDict&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;DictMixin&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;clase.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pe de altă parte, utilizarea sistematică a unor astfel de ABC-uri poate ajuta cadrele mari să facă ceea ce este mai bine cu mai puține presupuneri: în Python 2, nu este întotdeauna ușor de spus dacă un obiect ar trebui să fie o secvență sau o mapare atunci când definește un&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;__getitem __ )&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;metodă.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Următoarele standarde ABC sunt furnizate: Hashable, Iterable, Iterator, Sized, Container, Callable;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Set, MutableSet;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Mapping, MutableMapping;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Sequence, MutableSequence;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Număr, Complex, Real, Rational, Integer.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;IO&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;Modulul definește , de&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;asemenea ,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;un număr de ABC -&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;ul, astfel încât ,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pentru prima dată în istoria Python vom avea un caiet de&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sarcini pentru nebulos anterior conceptul de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;fișier asemănător&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Puterea cadrului ABC constă în capacitatea (împrumutate de la interfețele Zope) de a &quot;înregistra&quot; o clasă concretă X ca fiind &quot;moștenirea virtuală&quot; a unui ABC Y, unde X și Y sunt scrise de diferiți autori și apar în pachete diferite.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;(Pentru a clarifica, atunci când se folosește mostenirea virtuală, comportamentul mix-in al clasei Y nu este disponibil pentru clasa X. Singurul efect este acela că este&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;subclasa (X,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Y)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;va reveni la True.)&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div class=&quot;first&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pentru a susține definiția ABC care impune ca clasele concrete să pună în practică interfața completă, decoratorul&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;@ abc.abstractmethod&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;poate fi folosit pentru a declara metode abstracte (numai în clase ale căror metaclase este sau derivă din&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;abc.ABCMeta&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;).&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div class=&quot;first&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Funcții generice.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Includerea acestei caracteristici, descrisă în documentul PEP 3124, este oarecum incertă, deoarece activitatea pe PEP pare să fi încetinit până la stagnare.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Sperăm că ritmul va reveni din nou.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acesta acceptă expedierea funcției bazată pe tipul tuturor argumentelor, mai degrabă decât expedierea mai convențională bazată numai pe clasa obiectului țintă (&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;auto&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;).&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/span&gt;&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot;&gt;
&lt;h2 style=&quot;font-size: 24px; font-weight: normal;&quot;&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/null&quot; id=&quot;other-significant-changes&quot; name=&quot;other-significant-changes&quot;&gt;Alte schimbări semnificative&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Doar evidențiază.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;section&quot;&gt;
&lt;h3 style=&quot;font-size: 20px; font-weight: normal;&quot;&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/null&quot; id=&quot;exception-reform&quot; name=&quot;exception-reform&quot;&gt;Reforma excepțiilor&lt;/a&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;ul class=&quot;simple&quot;&gt;&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Excepțiile de șir au dispărut (desigur).&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Toate excepțiile trebuie să decurgă din&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;BaseException&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și de preferință de la&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;excepție&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Vom scăpa de&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;StandardError&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Excepțiile nu mai acționează ca secvențe.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În schimb, au un atribut&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;args&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;care este secvența de argumente transmise constructorului.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Cu&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;excepția&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;E,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;e:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;sintaxa se schimbă cu&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;excepția&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;E&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;ca&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;e&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;acest lucru evită confuzia ocazionale cu&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;excepția&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;E1,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;E2:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Variabila numit după&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;cum&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;în&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;afară&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;de clauza se elimină cu&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;forța la ieșirea din&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;afară&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;clauza.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;sys.exc_info ()&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;devine redundant (sau poate să dispară): în schimb,&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;e .__ class__&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este tipul de excepție și&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;&amp;nbsp;e .__ traceback__&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este trasarea.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Atribute opționale suplimentare&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;__context__&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este setat la excepția „anterioară“ ,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;atunci când are loc o excepție în&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;afară&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;sau în&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;cele din&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;urmă&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;clauză;&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;__cause__&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;poate fi setat în mod explicit atunci când re-ridicarea unei excepții, folosind&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;creșterea&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;E1 de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;la&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;E2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Vechile&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;ridica&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;variante de&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sintaxă&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;ridica&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;E,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;e&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;ridica&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;E,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;e,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;tb&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;au dispărut.&lt;/span&gt;&lt;/li&gt;
&lt;/span&gt;&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot;&gt;
&lt;h3 style=&quot;font-size: 20px; font-weight: normal;&quot;&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/null&quot; id=&quot;integer-reform&quot; name=&quot;integer-reform&quot;&gt;Întregul proces de reformare&lt;/a&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;ul class=&quot;simple&quot;&gt;&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Va exista un singur tip integrat intreg, numit &#39;int&#39;, al carui comportament este cel al lui &#39;long&#39; in Python 2. Sufixul literal &#39;L&#39; dispare.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;1/2&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;va returna&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;&amp;nbsp;0,5&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, nu&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;&amp;nbsp;0&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;(Folosiți&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;&amp;nbsp;1 // 2&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;pentru asta.)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Sintaxa literală octală se modifică la&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;0o777&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, pentru a evita confundarea dezvoltatorilor tineri.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Binare literale:&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;0b101&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;==&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;5&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;,&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;bin (5)&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;==&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&#39;0b101&#39;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/li&gt;
&lt;/span&gt;&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot;&gt;
&lt;h3 style=&quot;font-size: 20px; font-weight: normal;&quot;&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/null&quot; id=&quot;iterators-or-iterables-instead-of-lists&quot; name=&quot;iterators-or-iterables-instead-of-lists&quot;&gt;Iteratori sau Iterables în loc de Liste&lt;/a&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;ul class=&quot;simple&quot;&gt;&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;
&lt;li&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;seturile dict.keys ()&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;&amp;nbsp;dict.items ()&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;retur (vizualizări, într-adevăr);&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;dict.values ​​()&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;returnează o vizualizare de container iterabilă.&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;Iter * ()&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;variantele dispar.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;range ()&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;returnează tipul de obiect pe care&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;&amp;nbsp;xrange () îl&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;folosește pentru a reveni;&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;xrange ()&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;dispare.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;zip ()&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;,&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;&amp;nbsp;map ()&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;,&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;&amp;nbsp;filtru ()&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;returnează iterables (ca și omologii lor din&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;&amp;nbsp;itertools&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;deja fac).&lt;/span&gt;&lt;/li&gt;
&lt;/span&gt;&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot;&gt;
&lt;h3 style=&quot;font-size: 20px; font-weight: normal;&quot;&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;a href=&quot;https://www.blogger.com/null&quot; id=&quot;miscellaneous&quot; name=&quot;miscellaneous&quot;&gt;Diverse&lt;/a&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;ul class=&quot;simple&quot;&gt;&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Ordonarea comparațiilor (&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;&amp;lt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;,&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;&amp;lt;=&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;,&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;&amp;gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;,&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;&amp;gt; =&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;) va ridica&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;Tipul&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;de&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;eroare&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;în mod implicit, în loc să returneze rezultate arbitrare.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Comparațiile egalitate implicite (&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;==&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;,&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;! =&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, Pentru clase care nu suprascrie&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;__eq__&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;) compara identitatea de&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;obiect (&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;este&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;,&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;este&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;nu&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;(Acesta din urmă este neschimbat față de 2.x, comparațiile dintre tipurile compatibile, în general, nu se schimbă, numai comanda implicită bazată pe adresa de memorie este eliminată, deoarece a cauzat rezultate ireproductibile.)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Instrucțiunea&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;nelocală&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;vă permite să atribuiți variabilelor în domenii exterioare (non-globale).&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Noul&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;apel&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;super ()&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;: Apelarea&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;super ()&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;fără argumente este echivalentă cu&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;super (&amp;lt;this_class&amp;gt;,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;lt;first_arg&amp;gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Se&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;rădăcește&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;în interiorul cadrului stivă pentru a obține clasa dintr-o celulă specială numită&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;__class__&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;(pe care o puteți folosi și direct) și pentru a obține primul argument.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;__class__&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;se bazează pe includerea statică și textuală a metodei;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;este completat după ce metaclașul a creat obiectul de clasă (dar înainte de a se executa decoratorii de clasă).&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;super ()&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;lucrează atât în ​​metodele obișnuite, cât și în metodele de clasă.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Setați literalii:&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;{1,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;2,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;3}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și chiar setați înțelegeri:&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;{x&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;pentru&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;x&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;în&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;y&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;dacă&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;P (x)}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Rețineți că setul gol este&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;setat ()&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, deoarece&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;{}&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este un dict gol!&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;reduce () a&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;dispărut (într-adevăr, a fost mutat în functools).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest lucru nu înseamnă că nu-mi plac funcțiile de ordin superior;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;reflectă pur și simplu faptul că aproape tot codul care folosește&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;reduce ()&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;devine mai ușor de citit când se rescrie folosind o buclă veche obișnuită.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;(&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference&quot; href=&quot;http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/148061&quot; style=&quot;color: purple; text-decoration-line: none;&quot;&gt;&amp;nbsp;Exemplu&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;lambda&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, totuși, trăiește.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Sintaxa backtick-ului, de multe ori greu de citit, a dispărut (utilizați&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;repr ()&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;), la fel este&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;operatorul&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;&amp;lt;&amp;gt;&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;(folosiți&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;! =&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;; Era prea flagrant o încălcare a&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.python.org/dev/peps/pep-0020/&quot; style=&quot;color: purple; text-decoration-line: none;&quot;&gt;TOOWTDI&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;).&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;La nivelul C, va exista un API tampon nou, mult îmbunătățit, care va oferi o mai bună integrare cu numaba.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;(PEP 3118)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/span&gt;&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot;&gt;
&lt;h2 style=&quot;font-size: 24px; font-weight: normal;&quot;&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;a href=&quot;https://www.blogger.com/null&quot; id=&quot;library-reform&quot; name=&quot;library-reform&quot;&gt;Reforma bibliotecii&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Nu vreau să spun prea multe despre modificările aduse bibliotecii standard, deoarece acesta este un proiect care va începe să funcționeze real după lansarea versiunii 3.0a1 și nu o voi supraveghea personal (limba centrală este tot Mă descurc).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Este clar deja că eliminăm o mulțime de crustă neacceptată sau pur și simplu depășită (de exemplu, multe module aplicabile numai în cadrul SGI IRIX) și încercăm să redenumim modulele cu nume CapWords, cum ar fi&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;StringIO&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sau&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;UserDict&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, pentru a se conforma cu PEP 8 nume de standard pentru numele modulelor (care necesită un cuvânt cu litere mici).&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;section&quot;&gt;
&lt;h2 style=&quot;font-size: 24px; font-weight: normal;&quot;&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;a href=&quot;https://www.blogger.com/null&quot; id=&quot;and-finally&quot; name=&quot;and-finally&quot;&gt;Și, în sfârșit&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Am menționat că&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;viața&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;tt class=&quot;docutils literal&quot; style=&quot;color: #cd7b00; font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;American Typewriter&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.95em;&quot;&gt;lambda&lt;/tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;?&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Mai primesc cererea ocazională să o păstrez, așa că m-am gândit să o menționez de două ori.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Nu vă faceți griji, cererea a fost acordată de peste un an.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;section&quot; style=&quot;color: #212324; font-family: Arial, Helvetica, sans-serif; white-space: normal;&quot;&gt;
&lt;h1 style=&quot;font-size: 28px; font-weight: normal;&quot;&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;a href=&quot;https://www.blogger.com/null&quot; id=&quot;speaking-engagements&quot; name=&quot;speaking-engagements&quot;&gt;Vorbire Angajamente&lt;/a&gt;&lt;/span&gt;&lt;/h1&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Voi prezenta (sau am prezentat) acest material personal la mai multe evenimente:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ul class=&quot;simple&quot;&gt;&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Google Phoenix, biroul AZ, 21 iunie&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Tabăra O&#39;Reilly foo, 23 iunie, Sebastopol, CA (primeste-ma beat :-)&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference&quot; href=&quot;http://foocamp.crowdvine.com/&quot; style=&quot;color: purple; text-decoration-line: none;&quot;&gt;http://foocamp.crowdvine.com&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;CWI, Amsterdam, 5 iulie, ora 15:00 (locul de naștere al lui Python!)&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.cwi.nl/&quot; style=&quot;color: purple; text-decoration-line: none;&quot;&gt;Http://www.cwi.nl&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;EuroPython, Vilnius, Lituania, 10 iulie (nota principală)&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.europython.org/sections/tracks_and_talks/draft-timetable&quot; style=&quot;color: purple; text-decoration-line: none;&quot;&gt;http://www.europython.org/sections/tracks_and_talks/draft-timetable&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;OSCON, Portland, OR, 26 iulie, 14:35 (pistă Python)&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference&quot; href=&quot;http://conferences.oreillynet.com/cs/os2007/view/e_sess/12753&quot; style=&quot;color: purple; text-decoration-line: none;&quot;&gt;http://conferences.oreillynet.com/cs/os2007/view/e_sess/12753&lt;/a&gt;&lt;/li&gt;
&lt;/span&gt;&lt;/ul&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Diapozitivele de la OSCON sunt sus:&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference&quot; href=&quot;http://conferences.oreillynet.com/presentations/os2007/os_vanrossum.ppt&quot; style=&quot;color: purple; text-decoration-line: none;&quot;&gt;http://conferences.oreillynet.com/presentations/os2007/os_vanrossum.ppt&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;(versiunile anterioare au fost aproape identice).&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span face=&quot;arial, helvetica, sans-serif&quot; style=&quot;background-color: white; color: #212324; font-size: 28px; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span face=&quot;arial, helvetica, sans-serif&quot; style=&quot;background-color: white; color: #212324; font-size: 28px; white-space: pre-wrap;&quot;&gt;Răspunde!&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;div style=&quot;color: #212324; font-family: Arial, Helvetica, sans-serif; white-space: normal;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Au o părere?&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Cititorii au postat deja&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a href=&quot;http://www.artima.com/forums/flat.jsp?forum=106&amp;amp;thread=208549&quot; style=&quot;color: purple; text-decoration-line: none;&quot;&gt;47 de comentarii&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;despre această intrare în blog.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De ce să nu&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a href=&quot;http://www.artima.com/forums/post.jsp?forum=106&amp;amp;thread=208549&amp;amp;reply=true&quot; style=&quot;color: purple; text-decoration-line: none;&quot;&gt;adăugați a ta&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;?&lt;/span&gt;&lt;/div&gt;
&lt;h1 style=&quot;color: #212324; font-family: Arial, Helvetica, sans-serif; font-size: 28px; font-weight: normal; white-space: normal;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;RSS Feed&lt;/span&gt;&lt;/h1&gt;
&lt;div style=&quot;color: #212324; font-family: Arial, Helvetica, sans-serif; white-space: normal;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă doriți să fiți anunțat ori de câte ori Guido van van Rossum adaugă o nouă intrare la&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://www.artima.com/weblogs/index.jsp?blogger=guido&quot; style=&quot;color: purple; text-decoration-line: none;&quot;&gt;blogul său&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, să vă abonați la&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://www.artima.com/weblogs/feeds/bloggers/guido.rss&quot; style=&quot;color: purple; text-decoration-line: none;&quot;&gt;feedul&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;său&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://www.artima.com/weblogs/feeds/bloggers/guido.rss&quot; style=&quot;color: purple; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;RSS&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot; style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-color: white; color: #093644; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;a href=&quot;https://www.blogger.com/goog_277941117&quot;&gt;&lt;br /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot; style=&quot;color: #093644;&quot;&gt;&lt;a href=&quot;http://www.artima.com/weblogs/viewpost.jsp?thread=208549&quot;&gt;http://www.artima.com/weblogs/viewpost.jsp?thread=208549&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;a href=&quot;https://www.python.org/downloads/&quot;&gt;Download the latest source release&lt;/a&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;a href=&quot;https://www.python.org/downloads/release/python-364/&quot; style=&quot;-webkit-tap-highlight-color: rgb(30, 41, 51); background-color: #f2f4f6; box-sizing: border-box; color: #3776ab; font-family: SourceSansProBold, Arial, sans-serif; font-size: 14px; text-decoration-line: none;&quot;&gt;Python 3.6.4&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;h2 style=&quot;background-color: #f9f9f9; border: 0px; box-sizing: border-box; color: #999999; font-family: SourceSansProRegular, Arial, sans-serif; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; font-weight: normal; line-height: inherit; margin: 1.3125em 0px 0.32813em; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;OpenPGP Keys Public&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;background-color: #f9f9f9; border: 0px; box-sizing: border-box; color: #444444; font-family: SourceSansProRegular, Arial, sans-serif; font-size: 16px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Sursă și executabile binare sunt semnate de managerul de lansare folosind cheia OpenPGP.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Managerii de lansare și constructorii binare de la Python 2.3 au fost:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;ul style=&quot;background-color: #f9f9f9; border: 0px; box-sizing: border-box; color: #444444; font-family: SourceSansProRegular, Arial, sans-serif; font-size: 16px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; list-style: square; margin: 0px 0px 0px 1.5em; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;li style=&quot;border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Anthony Baxter (ID-ul cheii:&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference external&quot; href=&quot;https://www.python.org/~anthony/anthonypub.asc&quot; style=&quot;-webkit-tap-highlight-color: rgb(30, 41, 51); box-sizing: border-box; color: #3776ab; text-decoration-line: none;&quot;&gt;6A45C816&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;)&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Georg Brandl (ID-ul cheii:&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference external&quot; href=&quot;https://www.python.org/~gbrandl/gbrandlpub.asc&quot; style=&quot;-webkit-tap-highlight-color: rgb(30, 41, 51); box-sizing: border-box; color: #3776ab; text-decoration-line: none;&quot;&gt;36580288&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;)&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Ned Deily (ID-uri cheie:&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference external&quot; href=&quot;https://www.python.org/~nad/nadAA65421D.asc&quot; style=&quot;-webkit-tap-highlight-color: rgb(30, 41, 51); box-sizing: border-box; color: #3776ab; text-decoration-line: none;&quot;&gt;AA65421D&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;,&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference external&quot; href=&quot;https://www.python.org/~nad/nadpub.asc&quot; style=&quot;-webkit-tap-highlight-color: rgb(30, 41, 51); box-sizing: border-box; color: #3776ab; text-decoration-line: none;&quot;&gt;6F5E1540&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;și Apple Developer ID&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;SourceSansProBold, Arial, sans-serif&quot; style=&quot;border: 0px; box-sizing: border-box; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: 700; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;DJ3H93M7VJ&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;)&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Steve Dower (ID-ul cheii:&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference external&quot; href=&quot;https://pgp.mit.edu/pks/lookup?op=get&amp;amp;search=0xFC624643487034E5&quot; style=&quot;-webkit-tap-highlight-color: rgb(30, 41, 51); box-sizing: border-box; color: #3776ab; text-decoration-line: none;&quot;&gt;487034E5&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;)&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Larry Hastings (ID-ul cheii:&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference external&quot; href=&quot;https://www.python.org/~larry/larrygpg.asc&quot; style=&quot;-webkit-tap-highlight-color: rgb(30, 41, 51); box-sizing: border-box; color: #3776ab; text-decoration-line: none;&quot;&gt;F73C700D&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;)&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Martin v. Löwis (cheia id:&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference external&quot; href=&quot;https://www.dcl.hpi.uni-potsdam.de/people/loewis/mvl.asc&quot; style=&quot;-webkit-tap-highlight-color: rgb(30, 41, 51); box-sizing: border-box; color: #3776ab; text-decoration-line: none;&quot;&gt;7D9DC8D2&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;)&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Ronald Oussoren (ID-ul cheii: E6DF025C)&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Benjamin Peterson (ID cheie:&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference external&quot; href=&quot;https://www.python.org/~peterson/pubkey.asc&quot; style=&quot;-webkit-tap-highlight-color: rgb(30, 41, 51); box-sizing: border-box; color: #3776ab; text-decoration-line: none;&quot;&gt;18ADD4FF și A4135B38&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;)&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Barry Varșovia (ID-uri cheie:&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference external&quot; href=&quot;http://barry.warsaw.us/barrypub-gpg.asc&quot; style=&quot;-webkit-tap-highlight-color: rgb(30, 41, 51); box-sizing: border-box; color: #3776ab; text-decoration-line: none;&quot;&gt;A74B06BF, EA5BBD71 și ED9D77D5&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;)&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br style=&quot;background-color: #f9f9f9; box-sizing: border-box; color: #444444; font-family: SourceSansProRegular, Arial, sans-serif; font-size: 16px;&quot; /&gt;&lt;div style=&quot;background-color: #f9f9f9; border: 0px; box-sizing: border-box; color: #444444; font-family: SourceSansProRegular, Arial, sans-serif; font-size: 16px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Notă: ID-ul cheie al lui Barry A74B06BF este folosit pentru a semna versiunile Python 2.6.8 și 2.6.9.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;ID-ul său cheie EA5BBD71 a fost folosit pentru a semna toate celelalte versiuni Python 2.6 și 3.0.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;ID-ul său cheie ED9D77D5 este o cheie v3 și a fost folosit pentru a semna versiuni mai vechi;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;deoarece este o cheie veche MD5 și respinsă de implementări mai recente, ED9D77D5 nu mai este inclusă în fișierul cheie public.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br style=&quot;background-color: #f9f9f9; box-sizing: border-box; color: #444444; font-family: SourceSansProRegular, Arial, sans-serif; font-size: 16px;&quot; /&gt;&lt;div style=&quot;background-color: #f9f9f9; border: 0px; box-sizing: border-box; color: #444444; font-family: SourceSansProRegular, Arial, sans-serif; font-size: 16px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Puteți importa cheile publice ale managerului de lansare fie prin descărcarea&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference external&quot; href=&quot;https://www.python.org/static/files/pubkeys.txt&quot; style=&quot;-webkit-tap-highlight-color: rgb(30, 41, 51); box-sizing: border-box; color: #3776ab; text-decoration-line: none;&quot;&gt;fișierului de chei publice de aici&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;, fie apoi prin difuzarea acestuia&lt;/span&gt;&lt;/div&gt;
&lt;code style=&quot;background-color: #f9f9f9; border: 0px; box-sizing: border-box; color: #11a611; font-family: Consolas, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 16px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;pre style=&quot;border: 0px; box-sizing: border-box; font-family: Consolas, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; overflow-wrap: break-word; padding: 0px; vertical-align: baseline; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;gpg --import pubkeys.txt
&lt;/pre&gt;
&lt;/code&gt;&lt;span face=&quot;SourceSansProRegular, Arial, sans-serif&quot; style=&quot;background-color: #f9f9f9; color: #444444; font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;div style=&quot;background-color: #f9f9f9; border: 0px; box-sizing: border-box; color: #444444; font-family: SourceSansProRegular, Arial, sans-serif; font-size: 16px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;sau prin prinderea cheilor individuale direct din rețeaua keyserver executând această comandă:&lt;/span&gt;&lt;/div&gt;
&lt;code style=&quot;background-color: #f9f9f9; border: 0px; box-sizing: border-box; color: #11a611; font-family: Consolas, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 16px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;pre style=&quot;border: 0px; box-sizing: border-box; font-family: Consolas, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; overflow-wrap: break-word; padding: 0px; vertical-align: baseline; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;gpg --recv-keys 6A45C816 36580288 7D9DC8D2 18ADD4FF A4135B38 A74B06BF EA5BBD71 E6DF025C AA65421D 6F5E1540 F73C700D 487034E5
&lt;/pre&gt;
&lt;/code&gt;&lt;span face=&quot;SourceSansProRegular, Arial, sans-serif&quot; style=&quot;background-color: #f9f9f9; color: #444444; font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;div style=&quot;background-color: #f9f9f9; border: 0px; box-sizing: border-box; color: #444444; font-family: SourceSansProRegular, Arial, sans-serif; font-size: 16px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Pe paginile de descărcare specifice versiunii, ar trebui să vedeți un link atât la fișierul descărcabil, cât și la un fișier de semnătură detașat.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Pentru a verifica autenticitatea descărcării, apucați ambele fișiere și apoi executați această comandă:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;code style=&quot;background-color: #f9f9f9; border: 0px; box-sizing: border-box; color: #11a611; font-family: Consolas, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 16px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;pre class=&quot;literal-block&quot; style=&quot;border: 0px; box-sizing: border-box; font-family: Consolas, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; overflow-wrap: break-word; padding: 0px; vertical-align: baseline; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;gpg --verify Python-3.6.2.tgz.asc
&lt;/pre&gt;
&lt;/code&gt;&lt;span face=&quot;SourceSansProRegular, Arial, sans-serif&quot; style=&quot;background-color: #f9f9f9; color: #444444; font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;div style=&quot;background-color: #f9f9f9; border: 0px; box-sizing: border-box; color: #444444; font-family: SourceSansProRegular, Arial, sans-serif; font-size: 16px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Rețineți că trebuie să utilizați numele fișierului de semnătură și trebuie să utilizați unul corespunzător descărcării pe care o verificați.&lt;/span&gt;&lt;/div&gt;
&lt;ul style=&quot;background-color: #f9f9f9; border: 0px; box-sizing: border-box; color: #444444; font-family: SourceSansProRegular, Arial, sans-serif; font-size: 16px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; list-style: square; margin: 0px 0px 0px 1.5em; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;li style=&quot;border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;(Aceste instrucțiuni sunt orientate către&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;utilizatorii de linii de comandă&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference external&quot; href=&quot;http://www.gnupg.org/&quot; style=&quot;-webkit-tap-highlight-color: rgb(30, 41, 51); box-sizing: border-box; color: #3776ab; text-decoration-line: none;&quot;&gt;GnuPG&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;și Unix. Sunt binevenite contribuțiile instrucțiunilor pentru alte platforme și aplicații OpenPGP).&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 style=&quot;background-color: #f9f9f9; border: 0px; box-sizing: border-box; color: #999999; font-family: SourceSansProRegular, Arial, sans-serif; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; font-weight: normal; line-height: inherit; margin: 1.3125em 0px 0.32813em; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Alte elemente utile&lt;/span&gt;&lt;/h2&gt;
&lt;ul style=&quot;background-color: #f9f9f9; border: 0px; box-sizing: border-box; color: #444444; font-family: SourceSansProRegular, Arial, sans-serif; font-size: 16px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; list-style: square; margin: 0px 0px 0px 1.5em; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;li style=&quot;border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Căutați&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;SourceSansProBold, Arial, sans-serif&quot; style=&quot;border: 0px; box-sizing: border-box; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: 700; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;modulele Python de&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;la terțe părți&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;?&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference external&quot; href=&quot;http://pypi.python.org/pypi&quot; style=&quot;-webkit-tap-highlight-color: rgb(30, 41, 51); box-sizing: border-box; color: #3776ab; text-decoration-line: none;&quot;&gt;Index Pachetul&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;are multe dintre ele.&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Puteți&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference external&quot; href=&quot;http://docs.python.org/&quot; style=&quot;-webkit-tap-highlight-color: rgb(30, 41, 51); box-sizing: border-box; color: #3776ab; text-decoration-line: none;&quot;&gt;vizualiza&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;documentația standard pe internet sau o puteți&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference external&quot; href=&quot;http://docs.python.org/3/download.html&quot; style=&quot;-webkit-tap-highlight-color: rgb(30, 41, 51); box-sizing: border-box; color: #3776ab; text-decoration-line: none;&quot;&gt;descărca&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;în format HTML, PostScript, PDF și alte formate.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Vedeți pagina principală de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference external&quot; href=&quot;https://www.python.org/doc/&quot; style=&quot;-webkit-tap-highlight-color: rgb(30, 41, 51); box-sizing: border-box; color: #3776ab; text-decoration-line: none;&quot;&gt;documentare&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Informații despre&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference external&quot; href=&quot;https://www.python.org/downloads/unpacking&quot; style=&quot;-webkit-tap-highlight-color: rgb(30, 41, 51); box-sizing: border-box; color: #3776ab; text-decoration-line: none;&quot;&gt;instrumentele pentru dezarhivarea fișierelor de arhivă&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;furnizate pe portalul python.org sunt disponibile.&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span face=&quot;SourceSansProBold, Arial, sans-serif&quot; style=&quot;border: 0px; box-sizing: border-box; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: 700; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Sfat&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;: chiar dacă descărcați un binar gata pentru platforma dvs., este logic să descărcați și&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference external&quot; href=&quot;https://www.python.org/downloads/source&quot; style=&quot;-webkit-tap-highlight-color: rgb(30, 41, 51); box-sizing: border-box; color: #3776ab; text-decoration-line: none;&quot;&gt;sursa&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Aceasta vă permite să parcurgeți biblioteca standard (subdirectorul&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span face=&quot;SourceSansProBold, Arial, sans-serif&quot; style=&quot;border: 0px; box-sizing: border-box; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: 700; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Lib&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;) și colecțiile standard de demonstrații (&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;SourceSansProBold, Arial, sans-serif&quot; style=&quot;border: 0px; box-sizing: border-box; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: 700; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Demo&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;) și de instrumente (&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;SourceSansProBold, Arial, sans-serif&quot; style=&quot;border: 0px; box-sizing: border-box; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: 700; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Instrumente&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;) care vin împreună cu acestea.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Există multe lucruri pe care le puteți învăța de la sursă!&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Există, de asemenea, o&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference external&quot; href=&quot;https://wiki.python.org/moin/EmacsEditor&quot; style=&quot;-webkit-tap-highlight-color: rgb(30, 41, 51); box-sizing: border-box; color: #3776ab; text-decoration-line: none;&quot;&gt;colecție de pachete Emacs pe&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;care Pythoneer-ul Emacsing ar putea fi utile.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Acestea includ moduri majore de editare a interfețelor de depanare Python, C, C ++, Java, etc., etc.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Cele mai multe pachete sunt compatibile cu Emacs și XEmacs.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 style=&quot;background-color: #f9f9f9; border: 0px; box-sizing: border-box; color: #999999; font-family: SourceSansProRegular, Arial, sans-serif; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; font-weight: normal; line-height: inherit; margin: 1.3125em 0px 0.32813em; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Doriți să contribuiți?&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;background-color: #f9f9f9; border: 0px; box-sizing: border-box; color: #444444; font-family: SourceSansProRegular, Arial, sans-serif; font-size: 16px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Doriți să contribuiți?&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;Consultați&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;reference external&quot; href=&quot;https://www.python.org/dev/&quot; style=&quot;-webkit-tap-highlight-color: rgb(30, 41, 51); box-sizing: border-box; color: #3776ab; text-decoration-line: none;&quot;&gt;Ghidul dezvoltatorului Python pentru&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; vertical-align: inherit;&quot;&gt;&amp;nbsp;a afla cum este gestionată dezvoltarea Python.&amp;nbsp; Sursa :&amp;nbsp;&lt;a href=&quot;https://www.python.org/downloads/&quot;&gt;https://www.python.org/downloads/&amp;nbsp;&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h4 style=&quot;background-color: white; color: #555555; font-family: &amp;quot;trebuchet ms&amp;quot;, Verdana; font-size: 17px; font-weight: normal; margin: 0px; text-align: justify;&quot;&gt;
Ce este python?&lt;/h4&gt;
&lt;div class=&quot;tutorial_text&quot; style=&quot;background-color: white; color: #555555; font-family: Verdana; font-size: 12px; line-height: 18px; text-align: justify;&quot;&gt;
Python este un limbaj de programare&lt;b&gt;&amp;nbsp;interpretat&lt;/b&gt;. Pentru cei care nu stiu, un limbaj de programare este ceea ce scrii pentru a-i spune unui calculator ce are de facut. Oricum, computerul nu citeste limbajul in mod direct - exista sute de limbaje de programare si nu ar putea sa le inteleaga pe toate. Deci, cand cineva scrie un program, il va scrie in limbajul selectat si apoi il va compila - aceasta inseamna transformarea intr-o multime de 0 si de 1, pe care computerul le poate intelege rapid si usor. Diversele programele pe care le poti cumpara pentru calculatorul tau sunt deja compilate pentru Windows - daca incerci sa deschizi un astfel de program cu Notepad sau Wordpad, vei vedea doar o multime de caractere ciudate.&lt;/div&gt;
&lt;div class=&quot;tutorial_text&quot; style=&quot;background-color: white; color: #555555; font-family: Verdana; font-size: 12px; line-height: 18px; text-align: justify;&quot;&gt;
Un program care este compilat pentru Windows nu va functiona pe un alt sistem de operare. Diferenta dintre Python si astfel de programe este ca acest limbaj nu este niciodata compilat in totalitate - la rulare, fiecare instructiune este transformata in serii de 0 si 1 pe care computerul tau le poate intelege. In plus, totul este facut pe loc - codul este executat pe masura ce rulezi programul. Daca ai iesi din program si ai reveni in alta zi, bitii ar fi din nou compilati. Ti se pare a fi pierdere de timp? Poate, dar asta inseamna ca un program Python poate rula pe diferite sisteme de operare, fara a necesita ajustari. Ai putea trimite programul unui prieten, care utilizeaza un alt tip de computer. Sau ai putea posta programul pe Internet, de unde sa fie descarcat de persoane lucrand pe calculatoare diferite. Acesta este miracolul unui limbaj de programare interpretat - este un limbaj pe care orice sistem il poate INTELEGE.&lt;/div&gt;
&lt;h4 style=&quot;background-color: white; color: #555555; font-family: &amp;quot;trebuchet ms&amp;quot;, Verdana; font-size: 17px; font-weight: normal; margin: 0px; text-align: justify;&quot;&gt;
Cum se instaleaza python&lt;/h4&gt;
&lt;ol style=&quot;background-color: white; color: #555555; font-family: Verdana; font-size: 12px; text-align: justify;&quot;&gt;
&lt;li class=&quot;tutorial_text&quot; style=&quot;line-height: 18px;&quot;&gt;Mai intai downloadeaza Python urmand acest link(&lt;a class=&quot;paginatie_link&quot; href=&quot;http://www.python.org/download/&quot; style=&quot;color: #0066cc; font-family: Tahoma, Arial, Verdana, Helvetica; font-size: 11px; text-decoration-line: none;&quot; target=&quot;blank&quot;&gt;&amp;nbsp;http://www.python.org/download/&lt;/a&gt;).&lt;br /&gt;Pentru acest tutorial a fost utilizata versiunea 2.6.2.&lt;/li&gt;
&lt;li class=&quot;tutorial_text&quot; style=&quot;line-height: 18px;&quot;&gt;Executa fisierul downloadat si urmeaza comenzile.&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&quot;tutorial_text&quot; style=&quot;background-color: white; color: #555555; font-family: Verdana; font-size: 12px; line-height: 18px; text-align: justify;&quot;&gt;
OK! Sa speram ca totul a mers bine! Acum, pentru a testa daca functioneaza, tasteaza urmatoarea instructiune in fereastra de comenzi - daca lucrezi pe Windows, cauta Python in Programs, acceseaza&amp;nbsp;&lt;b&gt;Python (command line)&lt;/b&gt;, apoi ruleaza urmatoarea comanda:&lt;/div&gt;
&lt;div class=&quot;codeContainer&quot; style=&quot;background-color: #f4f4f4; border: 1px dashed rgb(207, 207, 207); color: #555555; font-family: Verdana; font-size: 12px; overflow-x: auto; text-align: justify; width: 550px;&quot;&gt;
&lt;div class=&quot;hl-main&quot; style=&quot;padding-left: 10px;&quot;&gt;
&lt;pre&gt;&lt;span class=&quot;hl-code&quot; style=&quot;color: black;&quot;&gt; print &quot;Hello World!&quot;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;tutorial_text&quot; style=&quot;background-color: white; color: #555555; font-family: Verdana; font-size: 12px; line-height: 18px; text-align: justify;&quot;&gt;
Incearca, vezi ce se intampla. Pentru a inchide fereastra, tasteaza &#39;quit()&#39;, apoi apasa Enter.&lt;/div&gt;
&lt;h3 style=&quot;background-color: white; color: #555555; font-family: Verdana; font-size: 18px; font-weight: normal; line-height: 18px; text-align: justify;&quot;&gt;
&#39;Programe&#39; foarte simple&lt;/h3&gt;
&lt;h4 style=&quot;background-color: white; color: #555555; font-family: &amp;quot;trebuchet ms&amp;quot;, Verdana; font-size: 17px; font-weight: normal; margin: 0px; text-align: justify;&quot;&gt;
Introducere&lt;/h4&gt;
&lt;div class=&quot;tutorial_text&quot; style=&quot;background-color: white; color: #555555; font-family: Verdana; font-size: 12px; line-height: 18px; text-align: justify;&quot;&gt;
OK! Am instalat python, si acum? Pai, sa programam!&lt;/div&gt;
&lt;div class=&quot;tutorial_text&quot; style=&quot;background-color: white; color: #555555; font-family: Verdana; font-size: 12px; line-height: 18px; text-align: justify;&quot;&gt;
Si este usor (cel putin pentru moment). Python face sa fie usor de rulat linii singulare de cod - programe mono-liniare. Sa incercam!&lt;/div&gt;
&lt;h3 style=&quot;background-color: white; color: #555555; font-family: Verdana; font-size: 18px; font-weight: normal; line-height: 18px; text-align: justify;&quot;&gt;
Deschidem IDLE&lt;/h3&gt;
&lt;div class=&quot;tutorial_text&quot; style=&quot;background-color: white; color: #555555; font-family: Verdana; font-size: 12px; line-height: 18px; text-align: justify;&quot;&gt;
Mergi in meniul de start, gaseste Python si ruleaza programul denumit &#39;IDLE&#39; (Vine de la Integrated Development Environment - Mediu Integrat de Dezvoltare).&lt;/div&gt;
&lt;div class=&quot;tutorial_text&quot; style=&quot;background-color: white; color: #555555; font-family: Verdana; font-size: 12px; line-height: 18px; text-align: justify;&quot;&gt;
Acum te afli in mediul IDLE. Acesta este locul in care iti vei petrece majoritatea timpului. Aici poti deschide o noua fereastra pentru a scrie un program sau poti pierde vremea cu linii singulare de cod, ceea ce vom si face. Tasteaza urmatoarele si apasa enter:&lt;/div&gt;
&lt;div class=&quot;codeContainer&quot; style=&quot;background-color: #f4f4f4; border: 1px dashed rgb(207, 207, 207); color: #555555; font-family: Verdana; font-size: 12px; overflow-x: auto; text-align: justify; width: 550px;&quot;&gt;
&lt;div class=&quot;hl-main&quot; style=&quot;padding-left: 10px;&quot;&gt;
&lt;pre&gt;&lt;span class=&quot;hl-code&quot; style=&quot;color: black;&quot;&gt; &amp;gt;&amp;gt;&amp;gt; print &quot;Hello World!&quot;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;tutorial_text&quot; style=&quot;background-color: white; color: #555555; font-family: Verdana; font-size: 12px; line-height: 18px; text-align: justify;&quot;&gt;
Ce s-a intamplat? Tocmai ai creat un program care afiseaza cuvintele &#39;Hello, World&#39;. Mediul IDLE in care te afli compileaza imediat orice ai tastat. Este extrem de util pentru testare, de exemplu la definirea variabilelor, sau pentru a verifica daca o anumita linie de cod functioneaza.&lt;/div&gt;
&lt;h3 style=&quot;background-color: white; color: #555555; font-family: Verdana; font-size: 18px; font-weight: normal; line-height: 18px; text-align: justify;&quot;&gt;
Matematica in Python&lt;/h3&gt;
&lt;div class=&quot;tutorial_text&quot; style=&quot;background-color: white; color: #555555; font-family: Verdana; font-size: 12px; line-height: 18px; text-align: justify;&quot;&gt;
Cu Python poti efectua anumite operatii matematice, cum ar fi:&lt;/div&gt;
&lt;div class=&quot;tutorial_text&quot; style=&quot;background-color: white; color: #555555; font-family: Verdana; font-size: 12px; line-height: 18px; text-align: justify;&quot;&gt;
- Adunare&lt;/div&gt;
&lt;div class=&quot;codeContainer&quot; style=&quot;background-color: #f4f4f4; border: 1px dashed rgb(207, 207, 207); color: #555555; font-family: Verdana; font-size: 12px; overflow-x: auto; text-align: justify; width: 550px;&quot;&gt;
&lt;div class=&quot;hl-main&quot; style=&quot;padding-left: 10px;&quot;&gt;
&lt;pre&gt;&lt;span class=&quot;hl-code&quot; style=&quot;color: black;&quot;&gt; &amp;gt;&amp;gt;&amp;gt; 1 + 1
2
&amp;gt;&amp;gt;&amp;gt; 20+80
100
&amp;gt;&amp;gt;&amp;gt; 18294+449566
467860&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;tutorial_text&quot; style=&quot;background-color: white; color: #555555; font-family: Verdana; font-size: 12px; line-height: 18px; text-align: justify;&quot;&gt;
-Scadere&lt;/div&gt;
&lt;div class=&quot;codeContainer&quot; style=&quot;background-color: #f4f4f4; border: 1px dashed rgb(207, 207, 207); color: #555555; font-family: Verdana; font-size: 12px; overflow-x: auto; text-align: justify; width: 550px;&quot;&gt;
&lt;div class=&quot;hl-main&quot; style=&quot;padding-left: 10px;&quot;&gt;
&lt;pre&gt;&lt;span class=&quot;hl-code&quot; style=&quot;color: black;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; 6-5
1&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;tutorial_text&quot; style=&quot;background-color: white; color: #555555; font-family: Verdana; font-size: 12px; line-height: 18px; text-align: justify;&quot;&gt;
- Inmultire&lt;/div&gt;
&lt;div class=&quot;codeContainer&quot; style=&quot;background-color: #f4f4f4; border: 1px dashed rgb(207, 207, 207); color: #555555; font-family: Verdana; font-size: 12px; overflow-x: auto; text-align: justify; width: 550px;&quot;&gt;
&lt;div class=&quot;hl-main&quot; style=&quot;padding-left: 10px;&quot;&gt;
&lt;pre&gt;&lt;span class=&quot;hl-code&quot; style=&quot;color: black;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; 2*5
10&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;tutorial_text&quot; style=&quot;background-color: white; color: #555555; font-family: Verdana; font-size: 12px; line-height: 18px; text-align: justify;&quot;&gt;
- Ridicare la putere&lt;/div&gt;
&lt;div class=&quot;codeContainer&quot; style=&quot;background-color: #f4f4f4; border: 1px dashed rgb(207, 207, 207); color: #555555; font-family: Verdana; font-size: 12px; overflow-x: auto; text-align: justify; width: 550px;&quot;&gt;
&lt;div class=&quot;hl-main&quot; style=&quot;padding-left: 10px;&quot;&gt;
&lt;pre&gt;&lt;span class=&quot;hl-code&quot; style=&quot;color: black;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; 5**2
25&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;tutorial_text&quot; style=&quot;background-color: white; color: #555555; font-family: Verdana; font-size: 12px; line-height: 18px; text-align: justify;&quot;&gt;
- Impartire&lt;/div&gt;
&lt;div class=&quot;codeContainer&quot; style=&quot;background-color: #f4f4f4; border: 1px dashed rgb(207, 207, 207); color: #555555; font-family: Verdana; font-size: 12px; overflow-x: auto; text-align: justify; width: 550px;&quot;&gt;
&lt;div class=&quot;hl-main&quot; style=&quot;padding-left: 10px;&quot;&gt;
&lt;pre&gt;&lt;span class=&quot;hl-code&quot; style=&quot;color: black;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; 21/3
7
&amp;gt;&amp;gt;&amp;gt; 23/3
7
&amp;gt;&amp;gt;&amp;gt; 23.0/3.0
7.6666�&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;tutorial_text&quot; style=&quot;background-color: white; color: #555555; font-family: Verdana; font-size: 12px; line-height: 18px; text-align: justify;&quot;&gt;
- Restul impartirii&lt;/div&gt;
&lt;div class=&quot;codeContainer&quot; style=&quot;background-color: #f4f4f4; border: 1px dashed rgb(207, 207, 207); color: #555555; font-family: Verdana; font-size: 12px; overflow-x: auto; text-align: justify; width: 550px;&quot;&gt;
&lt;div class=&quot;hl-main&quot; style=&quot;padding-left: 10px;&quot;&gt;
&lt;pre&gt;&lt;span class=&quot;hl-code&quot; style=&quot;color: black;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; 23%3
2
&amp;gt;&amp;gt;&amp;gt; 49%10
9&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;tutorial_text&quot; style=&quot;background-color: white; color: #555555; font-family: Verdana; font-size: 12px; line-height: 18px; text-align: justify;&quot;&gt;
In plus, poti afisa sume si variabile printr-un singur apel al functiei print, utilizand virgula pentru a separa diferitele sectiuni:&lt;/div&gt;
&lt;div class=&quot;codeContainer&quot; style=&quot;background-color: #f4f4f4; border: 1px dashed rgb(207, 207, 207); color: #555555; font-family: Verdana; font-size: 12px; overflow-x: auto; text-align: justify; width: 550px;&quot;&gt;
&lt;div class=&quot;hl-main&quot; style=&quot;padding-left: 10px;&quot;&gt;
&lt;pre&gt;&lt;span class=&quot;hl-code&quot; style=&quot;color: black;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; print &quot;un kilobyte este 2^10 bytes, sau&quot;, 2**10, &quot;bytes&quot;
un kilobyte este 2^10 bytes, sau 1024 bytes&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;background-color: white; color: black; width: 100%px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;span class=&quot;paginatie_text&quot; style=&quot;font-family: Tahoma, Arial, Verdana, Helvetica; font-size: 11px; text-transform: uppercase;&quot;&gt;&lt;b&gt;ALTE&amp;nbsp;&lt;a class=&quot;paginatie_link&quot; href=&quot;http://www.e-learn.ro/tutoriale/python/40.htm&quot; style=&quot;color: #0066cc; text-decoration-line: none;&quot; title=&quot;Tutoriale Python&quot;&gt;TUTORIALE PYTHON&lt;/a&gt;:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td height=&quot;5&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;ul class=&quot;tutorial_text&quot; style=&quot;color: #555555; font-family: Verdana; font-size: 12px; line-height: 18px;&quot;&gt;
&lt;li&gt;&lt;a class=&quot;paginatie_link&quot; href=&quot;http://www.e-learn.ro/tutorial/python/introducere-in-python-partea-a-iv-a-clase-si-obiecte/149/1/379.htm&quot; style=&quot;color: #0066cc; font-family: Tahoma, Arial, Verdana, Helvetica; font-size: 11px; text-decoration-line: none;&quot; title=&quot;Citeste tutorial:  Introducere in Python - Partea a IV-a. Clase si obiecte&quot;&gt;Introducere in Python - Partea a IV-a. Clase si obiecte&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;paginatie_link&quot; href=&quot;http://www.e-learn.ro/tutorial/python/introducere-in-python-partea-a-iii-a-liste-si-bucla-for-/149/1/375.htm&quot; style=&quot;color: #0066cc; font-family: Tahoma, Arial, Verdana, Helvetica; font-size: 11px; text-decoration-line: none;&quot; title=&quot;Citeste tutorial: Introducere in Python - Partea a III-a. Liste si bucla for.&quot;&gt;Introducere in Python - Partea a III-a. Liste si bucla for.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;paginatie_link&quot; href=&quot;http://www.e-learn.ro/tutorial/python/metoda-bulelor-sortarea-prin-insertie-si-sortarea-prin-interclasare-in-python/160/1/457.htm&quot; style=&quot;color: #0066cc; font-family: Tahoma, Arial, Verdana, Helvetica; font-size: 11px; text-decoration-line: none;&quot; title=&quot;Citeste tutorial: Metoda bulelor, sortarea prin insertie si sortarea prin interclasare in Python&quot;&gt;Metoda bulelor, sortarea prin insertie si sortarea prin interclasare in Python&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;paginatie_link&quot; href=&quot;http://www.e-learn.ro/tutorial/python/introducere-in-python-partea-a-ii-a-functii-/149/1/374.htm&quot; style=&quot;color: #0066cc; font-family: Tahoma, Arial, Verdana, Helvetica; font-size: 11px; text-decoration-line: none;&quot; title=&quot;Citeste tutorial: Introducere in Python - Partea a II-a. Functii.&quot;&gt;Introducere in Python - Partea a II-a. Functii.&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span style=&quot;color: #555555; font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: 12px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #555555; font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: 12px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: #f5f2e8; color: #484848; font-family: Tahoma, Arial, Verdana, Helvetica; font-size: 11px;&quot;&gt;Era intr-adevar o confuzie in tutorial referitor la comanda &quot;python -V&quot;. Aceasta presupune ca python este pornit din Command Prompt (Start &amp;gt; Run, apoi tasteaza cmd) , care nu este acelasi lucru cu &quot;Python (command line)&quot;. Pentru ca Windows-ul sa recunoasca instructiunea &quot;python&quot; trebuie ca variabila Path sa fie setata din Control Panel &amp;gt; System. In scurt timp vom adauga un tutorial despre cum trebuie setata aceasta variabila. In legatura cu eroarea de sintaxa, banuiesc ca tu ai instalat Python 3.1, in timp ce exemplele din acest tutorial au fost testate pe Python 2.6.2. Am corectat si am adaugat cateva lamuriri suplimentare in tutorial, care speram sa-ti fie de folos.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: #f5f2e8; color: #484848; font-family: Tahoma, Arial, Verdana, Helvetica; font-size: 11px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: #f5f2e8; color: #484848; font-family: Tahoma, Arial, Verdana, Helvetica; font-size: 11px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #555555; font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: 12px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #555555; font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: 12px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
Sursa :&amp;nbsp;&lt;a href=&quot;http://www.e-learn.ro/tutorial/python/introducere-in-python-partea-i/149/1/367.htm&quot;&gt;http://www.e-learn.ro/tutorial/python/introducere-in-python-partea-i/149/1/367.htm&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;PITON IN LINUX&lt;br /&gt;Pentru a rula un script din linia de comandă, tastați: python my_script.py. Pentru a ieși din linia de comandă, tastați exit () sau apăsați ctrl + d&lt;br /&gt; puteți încerca IDLE. Deschideți o fereastră terminal și tastați: &#39;inactiv&#39;. (fără ghilimele). Veți vedea shell-ul grafic python încărcat.&lt;br /&gt;puteți încerca IDLE. Deschideți o fereastră terminal și tastați: &#39;inactiv&#39;. (fără ghilimele). Veți vedea shell-ul grafic python încărcat.&lt;br /&gt;Pentru a scrie un script Python, faceți clic pe Fișier&amp;gt; Fereastră nouă. Aceasta va deschide un fel de editor de tip Notepad. Introduceți codul următor:&lt;br /&gt;# linuxversion.py&lt;br /&gt;# Aveți versiunea de intrare a utilizatorului și răspunsul la imprimare&lt;br /&gt;name = raw_input (&quot;Ce versiune de Linux folosiți?&quot;)&lt;br /&gt;print &quot;Îmi place de asemenea&quot;, nume, &quot;- Reguli Linux!&quot;&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;color: #464241; font-family: &amp;quot;open sans&amp;quot;; font-size: 12px; white-space: normal;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;color: #464241; font-family: &amp;quot;open sans&amp;quot;; font-size: 12px; white-space: normal;&quot;&gt;&lt;span face=&quot;&amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, sans-serif&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;Salvați fișierul, cu o extensie .py, apoi faceți clic pe Run&amp;gt; Run Module din meniu pentru a rula programul.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;Acum că aveți Python în funcțiune, veți dori, fără îndoială, să treceți la programe mai puțin complexe. Una dintre cele mai bune resurse este principalul &lt;a href=&quot;http://www.python.org/&quot;&gt;site Python&lt;/a&gt; . Iată câteva recomandări suplimentare:&lt;br /&gt;&lt;a href=&quot;http://docs.python.org/tutorial/&quot;&gt;Tutorialul Python&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://wiki.python.org/moin/BeginnersGuide&quot;&gt;Ghidul începătorului pentru&lt;/a&gt; Python Wiki&lt;a href=&quot;http://wiki.python.org/moin/BeginnersGuide&quot;&gt;&lt;/a&gt;&lt;br /&gt;Prezentare &lt;a href=&quot;http://showmedo.com/videotutorials/python&quot;&gt;ecran&lt;/a&gt;&lt;br /&gt;&lt;em style=&quot;background-color: white; box-sizing: inherit; color: #222222; font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, sans-serif; font-size: 16px; line-height: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: inherit; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: inherit; vertical-align: inherit;&quot;&gt;Sunteți gata să vă testați abilitățile în Python?&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: inherit; vertical-align: inherit;&quot;&gt;Vedeți cum s-au&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a href=&quot;http://smarterer.com/flock//?utm_source=pluralsight&amp;amp;utm_medium=blog&amp;amp;utm_campaign=bloglinks&quot; style=&quot;box-sizing: inherit; color: #f15b2a; line-height: inherit;&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;box-sizing: inherit; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: inherit; vertical-align: inherit;&quot;&gt;supus&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;box-sizing: inherit; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: inherit; vertical-align: inherit;&quot;&gt;acestei evaluări de la&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://smarterer.com/flock//?utm_source=pluralsight&amp;amp;utm_medium=blog&amp;amp;utm_campaign=bloglinks&quot; style=&quot;box-sizing: inherit; color: #f15b2a; line-height: inherit;&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;box-sizing: inherit; vertical-align: inherit;&quot;&gt;Smarterer&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;box-sizing: inherit; vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: inherit; vertical-align: inherit;&quot;&gt;Începeți acest&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;span face=&quot;&amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, sans-serif&quot; style=&quot;background-color: white; box-sizing: inherit; color: #222222; font-size: 16px; vertical-align: inherit;&quot;&gt;&lt;em style=&quot;box-sizing: inherit; line-height: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: inherit; vertical-align: inherit;&quot;&gt;test&amp;nbsp;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;a href=&quot;http://smarterer.com/tests/python//?utm_source=pluralsight&amp;amp;utm_medium=blog&amp;amp;utm_campaign=bloglinks&quot; style=&quot;background-color: white; box-sizing: inherit; color: #f15b2a; font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, sans-serif; font-size: 16px; line-height: inherit;&quot; target=&quot;_blank&quot;&gt;&lt;em style=&quot;box-sizing: inherit; line-height: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: inherit; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: inherit; vertical-align: inherit;&quot;&gt;Python&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;/a&gt;&lt;em style=&quot;background-color: white; box-sizing: inherit; color: #222222; font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, sans-serif; font-size: 16px; line-height: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: inherit; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: inherit; vertical-align: inherit;&quot;&gt;&amp;nbsp;acum.&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;color: #464241; font-family: &amp;quot;open sans&amp;quot;;&quot;&gt;&lt;br /&gt;&lt;a href=&quot;https://www.pluralsight.com/blog/software-development/introduction-to-python-programming-in-ubuntu-linux&quot;&gt;https://www.pluralsight.com/blog/software-development/introduction-to-python-programming-in-ubuntu-linux&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;color: #464241; font-family: &amp;quot;open sans&amp;quot;; font-size: 12px; white-space: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;h1 class=&quot;title&quot; style=&quot;background-color: white; font-family: Arial, sans-serif; font-size: 1.4em; margin: 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Programarea Python pentru începători&lt;/span&gt;&lt;/h1&gt;
&lt;div class=&quot;abstract&quot; style=&quot;background-color: white; font-family: Arial, sans-serif; font-size: 0.9em; font-style: italic; margin: 1em 0px;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă doriți să depășiți Inchiziția spaniolă, învățați Python.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest articol este o introducere practică în scrierea de aplicații non-triviale în Python.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;content&quot; style=&quot;background-color: white; font-family: Georgia, serif; line-height: 1.3em; margin: 5px 0px 20px;&quot;&gt;
&lt;div class=&quot;article&quot; lang=&quot;en&quot;&gt;
&lt;div class=&quot;simplesect&quot; lang=&quot;en&quot;&gt;
&lt;div class=&quot;titlepage&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/null&quot; name=&quot;N0xa50890.0xb44ac0&quot; style=&quot;color: #003366; font-weight: bold;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În ciuda a ceea ce codul de asamblare și codificatorii C ne-ar putea spune, limbile de nivel înalt își au locul în fiecare cutie de instrumente a programatorului, iar unele dintre ele sunt mult mai mult decât o curiozitate în domeniul informaticii.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Din multele limbi de nivel înalt pe care le putem alege de astăzi, Python pare a fi cel mai interesant pentru cei care vor să învețe ceva nou și să facă o muncă reală în același timp.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Implementarea ei fără program de orientare obiect și sintaxa sa curată și ușor de înțeles îl fac o limbă care este&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;emphasis&quot;&gt;&lt;em&gt;distractivă de&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;a învăța și de a folosi, ceea ce nu este ceva ce putem spune despre cele mai multe alte limbi.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În acest tutorial veți învăța cum să scrieți aplicații care utilizează opțiunile de linie de comandă, citiți și scrieți pe conducte, accesați variabilele de mediu, gestionați întreruperi, citiți și scrieți fișiere, creați fișiere temporare și scrieți în jurnale de sistem.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Cu alte cuvinte, veți găsi rețete pentru scrierea de aplicații reale în loc de vechiul plictisitor&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;Hello, World!&amp;nbsp;&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;chestie.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;simplesect&quot; lang=&quot;en&quot;&gt;
&lt;div class=&quot;titlepage&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/null&quot; name=&quot;N0xa50890.0xb44cd0&quot; style=&quot;color: #003366; font-weight: bold;&quot;&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Noțiuni de bază&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pentru a începe, dacă nu ați instalat interpretul Python pe sistemul dvs., acum este timpul.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pentru a face acest pas mai ușor, instalați ultima distribuție Python utilizând pachete compatibile cu distribuția dvs. Linux.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;rpm, deb și tgz sunt de asemenea disponibile pe CD-ul dvs. Linux sau on-line.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă urmați procedurile de instalare standard, nu trebuie să aveți probleme.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Apoi, citiți excelentul&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;emphasis&quot;&gt;&lt;em&gt;Tutorial Python&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;scris de Guido van Rossum, creatorul limbajului de programare Python.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest tutorial face parte din documentația oficială Python și îl puteți găsi în catalogul /usr/doc/python-docs-1.5.2 sau /usr/local/doc/python-docs-1.5.2.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acesta poate fi livrat în format LaTeX brut, care trebuie prelucrat mai întâi;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;dacă nu știți cum să faceți acest lucru, accesați&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a href=&quot;http://www.python.org/doc&quot; style=&quot;color: #003366; font-weight: bold; text-decoration-line: none;&quot;&gt;http://www.python.org/doc/&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;pentru al descărca într-un format alternativ.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;De asemenea, vă recomandăm să aveți&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;emphasis&quot;&gt;&lt;em&gt;instrucțiunea Bibliotecii Python&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;la îndemână;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;ați putea dori atunci când explicațiile date aici nu corespund nevoilor dumneavoastră.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;O puteți găsi în aceleași locuri ca și&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;emphasis&quot;&gt;&lt;em&gt;Tutorialul Python&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Crearea de scripturi se poate face folosind editorul de text preferat atâta timp cât salvează textul în format ASCII simplu și nu introduce automat pauze de linie atunci când linia este mai lungă decât lățimea ferestrei editorului.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Începeți întotdeauna scenariile dvs. cu oricare dintre ele&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;programlisting&quot; style=&quot;color: #336699; overflow: auto;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;#! &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;/ Usr / local / bin / python
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sau&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;programlisting&quot; style=&quot;color: #336699; overflow: auto;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;#! &lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;/ Usr / bin / python
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă calea de acces la sistemul&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;binar&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;python&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;din sistemul dvs. este diferită, modificați acea linie, lăsând primele două caractere (&amp;nbsp;&lt;/span&gt;&lt;b&gt;#!&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;) Intacte.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Asigurați-vă că această linie este cu adevărat prima linie din scenariul dvs., nu doar prima linie ne-goală - vă va salva o mulțime de frustrare.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Utilizați&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;bold&quot;&gt;&lt;b&gt;chmod&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;pentru a seta permisiunile fișierelor pe scriptul dvs. pentru a deveni executabil.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă scriptul este pentru tine singur, tastați&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;chmod 0700&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;scriptfilename&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/i&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.py&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;dacă doriți să îl partajați cu alții din grupul dvs., dar nu lăsați-l să-l editeze, utilizați&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;0750&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;ca valoare chmod;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;dacă doriți să acordați acces tuturor celorlalți, utilizați valoarea&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;0755&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pentru ajutor cu comanda chmod, tastați&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;chmod om&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;simplesect&quot; lang=&quot;en&quot;&gt;
&lt;div class=&quot;titlepage&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/null&quot; name=&quot;N0xa50890.0xb454b8&quot; style=&quot;color: #003366; font-weight: bold;&quot;&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Citirea opțiunilor și a argumentelor liniei de comandă&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Opțiunile și argumentele din linia de comandă vin la îndemână când vrem să le spunem script-urilor noastre cum să se comporte sau să treacă la ele anumite argumente (nume de fișiere, nume de directoare, nume de utilizatori etc.).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Toate programele pot citi aceste opțiuni și argumente dacă doresc, iar scripturile dvs. Python nu diferă.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Implementarea handler-ilor adecvați se reduce la citirea&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;listei&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;argv&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și verificarea opțiunilor și argumentelor pe care doriți să le recunoască scriptul.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Există câteva moduri de a face acest lucru.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Listarea 1 este o opțiune de tratare a opțiunilor simple, care recunoaște opțiunile comune -h, -help și -help, iar când acestea sunt găsite, aceasta se termină imediat după afișarea mesajului de ajutor.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.linuxjournal.com/files/linuxjournal.com/linuxjournal/articles/039/3946/3946l1.html&quot; style=&quot;color: #003366; font-weight: bold; text-decoration-line: none;&quot;&gt;Listarea 1&lt;/a&gt;&lt;br /&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Copiați și salvați acest script ca help.py, faceți-l executabil cu&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;comanda&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;help.py chmod 0755&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și executați-l de mai multe ori, specificând diferite opțiuni, ambele recunoscute de manipulator și nu;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;de exemplu, cu una dintre opțiuni, veți vedea acest mesaj:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;./help.py -h&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;sau&amp;nbsp;&lt;/span&gt;&lt;b&gt;./help.py -o&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă managerul de opțiuni recunoaște una dintre opțiuni, veți vedea acest mesaj:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;programlisting&quot; style=&quot;color: #336699; overflow: auto;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;help.py-nu face nimic util (încă)&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
opțiuni: -h, -help sau -help-afișează acest ajutor&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;
Drepturi de autor (c) Jacek Artymiak, 2000&lt;/span&gt;
&lt;/pre&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă invocați&amp;nbsp;&lt;/span&gt;&lt;b&gt;help.py&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;cu o opțiune pe care nu o recunoaște sau fără nicio opțiune, acesta va afișa mesajul &quot;Nu recunosc această opțiune&quot;.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Rețineți că trebuie să&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;bold&quot;&gt;&lt;b&gt;importem&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;modulul&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;bold&quot;&gt;&lt;b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;sys&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;înainte de a putea verifica conținutul&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;listei&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;argv&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și înainte de a putea apela&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;funcția de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;bold&quot;&gt;&lt;b&gt;ieșire&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Instrucțiunea&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;bold&quot;&gt;&lt;b&gt;sys.exit&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este o caracteristică de siguranță care împiedică executarea ulterioară a programului atunci când una dintre opțiunile de ajutor este găsită în interiorul&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;listei&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;argv&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest lucru asigură că utilizatorii nu fac ceva periculos înainte de a citi mesajele de ajutor (pentru care nu ar avea nevoie altfel).&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Modulul simplu de manipulare a opțiunilor de ajutor descris mai sus funcționează destul de bine și puteți să îl duplicați și să îl modificați pentru a recunoaște opțiunile suplimentare, dar aceasta nu este cea mai eficientă modalitate de a recunoaște mai multe opțiuni cu sau fără argumente.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Modul &quot;potrivit&quot; de a face acest lucru este de a folosi&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;modulul&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;bold&quot;&gt;&lt;b&gt;getopt&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, care convertește opțiunile și argumentele într-o listă drăguță de tupluri.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Lista 2 arată cum funcționează.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.linuxjournal.com/files/linuxjournal.com/linuxjournal/articles/039/3946/3946l2.html&quot; style=&quot;color: #003366; font-weight: bold; text-decoration-line: none;&quot;&gt;Listing 2&lt;/a&gt;&lt;br /&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Copiați acest script, salvați-l ca options.py și faceți-l executabil.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;După cum puteți vedea, utilizează două module: sys și getopt care sunt importate chiar la început.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Apoi definim o funcție simplă care afișează mesajul de ajutor atunci când ceva nu merge bine.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Procesarea efectivă a argumentelor liniei de comandă începe cu&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;instrucțiunea&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;try&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;, unde testează lista opțiunilor și argumentelor din linia de comandă (sys.argv) pentru erorile definite ca opțiuni necunoscute sau argumente lipsă;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;în cazul în&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;care sunt detectate, script -&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;ul va afișa un mesaj de&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;eroare și de&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;ieșire imediat ( a se&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;vedea în&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;afara cazului&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;de grup declarație).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Atunci când nu s-au detectat erori, scriptul nostru împarte lista opțiunilor și argumentele lor în tuple din&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;lista de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;opțiuni&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;și începe să le parseze executând o serie de bucle, fiecare căutând o opțiune și argumentele așteptate.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Funcția&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;bold&quot;&gt;&lt;b&gt;getopt.getopt&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;generează două liste în scriptul nostru de mostre:&amp;nbsp;&lt;/span&gt;&lt;b&gt;opțiuni&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;care conțin opțiuni și argumentele acestora;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;și&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;xargumente&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;care conțin argumente care nu sunt legate de niciuna dintre opțiuni.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Putem ignora în siguranță în cele mai multe cazuri.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Pentru a recunoaște&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;opțiunile&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;scurte (cu o singură literă precum&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;-h&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;) și long (cu cele prefixate cu&amp;nbsp;&lt;/span&gt;&lt;b&gt;-&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;), getopt.getopt utilizează două argumente separate.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Lista opțiunilor scurte conține toate listate într-un singur șir, de exemplu,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;getopt.getopt (sys.argv, &#39;ahoinmdwq&#39;)&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Este posibil să specificăm în șirul respectiv opțiunile care necesită absolut un argument pentru a le urma imediat (de exemplu,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;-v&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;nume fișier&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/i&gt;&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;) sau după un spațiu (de exemplu,&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;-v&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;tt&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;nume de fișier&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/i&gt;&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acest lucru se face prin inserarea două puncte (&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;:&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;) dupa optiunea, ca aceasta:&amp;nbsp;&lt;/span&gt;&lt;b&gt;getopt.getopt (sys.argv, „ahoiv: emwn“&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Cu toate acestea, aceasta creează o problemă proastă care poate provoca o anumită confuzie și pierde în mod inutil timpul;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;dacă utilizatorul uită să specifice argumentul pentru opțiunea care o cere, opțiunea care urmează îl devine argument.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Luați în considerare acest exemplu:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;programlisting&quot; style=&quot;color: #336699; overflow: auto;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;script.py -v -h
&lt;/span&gt;&lt;/pre&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă ați pus&amp;nbsp;&lt;/span&gt;&lt;b&gt;v:&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;în argumentul șirului opțional scurt al funcției getopt.getopt, opțiunea&amp;nbsp;&lt;/span&gt;&lt;b&gt;-h&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;va fi tratată ca argumentul opțiunii&amp;nbsp;&lt;/span&gt;&lt;b&gt;-v&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Aceasta este o problemă și face parsarea listei de&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;emphasis&quot;&gt;&lt;em&gt;opțiuni&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;tuple&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;emphasis&quot;&gt;&lt;em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;, argument&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;mult mai dificil.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Soluția la această problemă este simplă: nu folosiți colonul, ci verificați cel de-al doilea element al tuplei care conține opțiunea (primul element al tuplei analizate) care necesită un argument.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Dacă este gol, raportați o eroare, cum ar fi&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;opțiunea&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;-a&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;opțiunea de manipulare.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Opțiunile lungi prefixate cu&amp;nbsp;&lt;/span&gt;&lt;b&gt;-&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;trebuie să fie listate ca un argument separat pentru getopt.getopt, de exemplu,&amp;nbsp;&lt;/span&gt;&lt;b&gt;getopt.getopt (sys.argv, &#39;ah&#39;, [&#39;view&#39;, &#39;file =&#39;])&lt;/b&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Acestea pot fi întreținute de același manipulant ca opțiunile scurte.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Ce faceți după ce localizați opțiunile oferite de utilizator depinde de dvs.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Listarea 2 poate fi utilizată ca șablon pentru scripturile dvs.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Sursa :&amp;nbsp;&lt;a href=&quot;http://www.linuxjournal.com/article/3946&quot;&gt;http://www.linuxjournal.com/article/3946&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;color: #464241; font-family: &amp;quot;open sans&amp;quot;; font-size: 12px; white-space: normal;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;color: #464241; font-family: &amp;quot;open sans&amp;quot;; font-size: 12px; white-space: normal;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;color: #464241; font-family: &amp;quot;open sans&amp;quot;; font-size: 12px; white-space: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;color: #464241; font-family: &amp;quot;open sans&amp;quot;; font-size: 12px; white-space: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;color: #464241; font-family: &amp;quot;open sans&amp;quot;; font-size: 12px; white-space: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;color: #464241; font-family: &amp;quot;open sans&amp;quot;; font-size: 12px; white-space: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;color: #464241; font-family: &amp;quot;open sans&amp;quot;; font-size: 12px; white-space: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;color: #464241; font-family: &amp;quot;open sans&amp;quot;; font-size: 12px; white-space: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;color: #464241; font-family: &amp;quot;open sans&amp;quot;; font-size: 12px; white-space: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-color: white; color: #093644; font-family: &amp;quot;arial&amp;quot;; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://infotestpc.blogspot.com/feeds/5144151734029788362/comments/default' title='Postare comentarii'/><link rel='replies' type='text/html' href='http://infotestpc.blogspot.com/2018/01/python-guido-van-rossum.html#comment-form' title='0 comentarii'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5038728009841547747/posts/default/5144151734029788362'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5038728009841547747/posts/default/5144151734029788362'/><link rel='alternate' type='text/html' href='http://infotestpc.blogspot.com/2018/01/python-guido-van-rossum.html' title='Python - Guido van Rossum'/><author><name>Al Con</name><uri>http://www.blogger.com/profile/17409243868650327707</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizOpLxdi9JZQ2rL34_jagIWMH5xdrcvT4kOEOCd6k2WcqyUNgexdI_DY87byzGTFOoA99SK8CcgGM1QWu9n4ZLFH9yzD2e0Qu3P-PYJyNWGITcg3Du1udTEgEqh_ygG5_uSWD7rnTVqQ/s72-c/Guido+van+Rossum+-+Programare+Phyton.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5038728009841547747.post-1611369218412127997</id><published>2018-01-13T20:42:00.001-08:00</published><updated>2020-12-16T12:13:17.192-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="BAZE DE DATE"/><category scheme="http://www.blogger.com/atom/ns#" term="Calculatorul"/><category scheme="http://www.blogger.com/atom/ns#" term="Ecuatii"/><category scheme="http://www.blogger.com/atom/ns#" term="Initiere"/><category scheme="http://www.blogger.com/atom/ns#" term="Kali Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="Module"/><category scheme="http://www.blogger.com/atom/ns#" term="programare"/><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><title type='text'>Programare - Secvențe și Exemple</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkUL0zIc2nFI0y7S9FxVcfqJ1jDm1luI9hOjbRoAoY4QMDgo23JDc8N3663gna1gjKFz6yUaRYRTvvOocWZ3Z0LOml2wOyfLQ6JXC_mbzg4_s8gUGjeH75AL4oDvqJKK_m1o_d25NqdQ/s1884/Comunicativ+1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1062&quot; data-original-width=&quot;1884&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkUL0zIc2nFI0y7S9FxVcfqJ1jDm1luI9hOjbRoAoY4QMDgo23JDc8N3663gna1gjKFz6yUaRYRTvvOocWZ3Z0LOml2wOyfLQ6JXC_mbzg4_s8gUGjeH75AL4oDvqJKK_m1o_d25NqdQ/s320/Comunicativ+1.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h1 style=&quot;background-color: white; color: #3e4349; font-family: Garamond, Georgia, serif; font-weight: normal; margin: 0px 0px 10px; padding: 0px;&quot;&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;a href=&quot;http://docs.python-guide.org/en/latest/starting/install3/linux/&quot;&gt;Installing Python 3 on Linux&lt;/a&gt;&lt;/span&gt;&lt;/h1&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: white; color: #3e4349; font-family: &amp;quot;goudy old style&amp;quot;, &amp;quot;minion pro&amp;quot;, &amp;quot;bell mt&amp;quot;, Georgia, &amp;quot;Hiragino Mincho Pro&amp;quot;, serif; font-size: 17px; line-height: 1.4em;&quot;&gt;
This document describes how to install Python 3.6 on Ubuntu Linux machines.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #3e4349; font-family: &amp;quot;goudy old style&amp;quot;, &amp;quot;minion pro&amp;quot;, &amp;quot;bell mt&amp;quot;, Georgia, &amp;quot;Hiragino Mincho Pro&amp;quot;, serif; font-size: 17px; line-height: 1.4em;&quot;&gt;
To see which version of Python 3 you have installed, open a command prompt and run&lt;/div&gt;
&lt;div class=&quot;highlight-console&quot; style=&quot;background-color: white; color: #3e4349; font-family: &amp;quot;goudy old style&amp;quot;, &amp;quot;minion pro&amp;quot;, &amp;quot;bell mt&amp;quot;, Georgia, &amp;quot;Hiragino Mincho Pro&amp;quot;, serif; font-size: 17px;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial;&quot;&gt;
&lt;pre style=&quot;background: rgb(238, 238, 238); font-family: Consolas, Menlo, &amp;quot;Deja Vu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, monospace; font-size: 0.9em; line-height: 1.3em; margin-bottom: 15px; margin-top: 15px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 7px 30px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #745334;&quot;&gt;$&lt;/span&gt; python3 --version
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #3e4349; font-family: &amp;quot;goudy old style&amp;quot;, &amp;quot;minion pro&amp;quot;, &amp;quot;bell mt&amp;quot;, Georgia, &amp;quot;Hiragino Mincho Pro&amp;quot;, serif; font-size: 17px; line-height: 1.4em;&quot;&gt;
If you are using Ubuntu 16.10 or newer, then you can easily install Python 3.6 with the following commands:&lt;/div&gt;
&lt;div class=&quot;highlight-python&quot; style=&quot;background-color: white; color: #3e4349; font-family: &amp;quot;goudy old style&amp;quot;, &amp;quot;minion pro&amp;quot;, &amp;quot;bell mt&amp;quot;, Georgia, &amp;quot;Hiragino Mincho Pro&amp;quot;, serif; font-size: 17px;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial;&quot;&gt;
&lt;pre style=&quot;background: rgb(238, 238, 238); font-family: Consolas, Menlo, &amp;quot;Deja Vu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, monospace; font-size: 0.9em; line-height: 1.3em; margin-bottom: 15px; margin-top: 15px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 7px 30px;&quot;&gt;$ sudo apt-get update
$ sudo apt-get install python3.6
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #3e4349; font-family: &amp;quot;goudy old style&amp;quot;, &amp;quot;minion pro&amp;quot;, &amp;quot;bell mt&amp;quot;, Georgia, &amp;quot;Hiragino Mincho Pro&amp;quot;, serif; font-size: 17px; line-height: 1.4em;&quot;&gt;
If you’re using another version of Ubuntu (e.g. the latest LTS release), we recommend using the&amp;nbsp;&lt;a class=&quot;reference external&quot; href=&quot;https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa&quot; style=&quot;border-bottom: 1px dotted rgb(0, 75, 107); color: #004b6b; text-decoration-line: none;&quot;&gt;deadsnakes PPA&lt;/a&gt;&amp;nbsp;to install Python 3.6:&lt;/div&gt;
&lt;div class=&quot;highlight-python&quot; style=&quot;background-color: white; color: #3e4349; font-family: &amp;quot;goudy old style&amp;quot;, &amp;quot;minion pro&amp;quot;, &amp;quot;bell mt&amp;quot;, Georgia, &amp;quot;Hiragino Mincho Pro&amp;quot;, serif; font-size: 17px;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial;&quot;&gt;
&lt;pre style=&quot;background: rgb(238, 238, 238); font-family: Consolas, Menlo, &amp;quot;Deja Vu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, monospace; font-size: 0.9em; line-height: 1.3em; margin-bottom: 15px; margin-top: 15px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 7px 30px;&quot;&gt;$ sudo apt-get install software-properties-common
$ sudo add-apt-repository ppa:deadsnakes/ppa
$ sudo apt-get update
$ sudo apt-get install python3.6
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #3e4349; font-family: &amp;quot;goudy old style&amp;quot;, &amp;quot;minion pro&amp;quot;, &amp;quot;bell mt&amp;quot;, Georgia, &amp;quot;Hiragino Mincho Pro&amp;quot;, serif; font-size: 17px; line-height: 1.4em;&quot;&gt;
If you are using other Linux distribution, chances are you already have Python 3 pre-installed as well. If not, use your distribution’s package manager. For example on Fedora, you would use&amp;nbsp;&lt;cite&gt;dnf&lt;/cite&gt;:&lt;/div&gt;
&lt;div class=&quot;highlight-console&quot; style=&quot;background-color: white; color: #3e4349; font-family: &amp;quot;goudy old style&amp;quot;, &amp;quot;minion pro&amp;quot;, &amp;quot;bell mt&amp;quot;, Georgia, &amp;quot;Hiragino Mincho Pro&amp;quot;, serif; font-size: 17px;&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial;&quot;&gt;
&lt;pre style=&quot;background: rgb(238, 238, 238); font-family: Consolas, Menlo, &amp;quot;Deja Vu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, monospace; font-size: 0.9em; line-height: 1.3em; margin-bottom: 15px; margin-top: 15px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 7px 30px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #745334;&quot;&gt;$&lt;/span&gt; sudo dnf install python3&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #3e4349; font-family: &amp;quot;goudy old style&amp;quot;, &amp;quot;minion pro&amp;quot;, &amp;quot;bell mt&amp;quot;, Georgia, &amp;quot;Hiragino Mincho Pro&amp;quot;, serif; font-size: 17px; line-height: 1.4em;&quot;&gt;
Note that if the version of the&amp;nbsp;&lt;code class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; color: #222222; font-family: Consolas, Menlo, &amp;quot;Deja Vu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, monospace; font-size: 0.9em;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;python3&lt;/span&gt;&lt;/code&gt;&amp;nbsp;package is not recent enough for you, there may be ways of installing more recent versions as well, depending on you distribution. For example installing the&amp;nbsp;&lt;code class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; color: #222222; font-family: Consolas, Menlo, &amp;quot;Deja Vu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, monospace; font-size: 0.9em;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;python36&lt;/span&gt;&lt;/code&gt;&amp;nbsp;package on Fedora 25 to get Python 3.6. If you are a Fedora user, you might want to read about&amp;nbsp;&lt;a class=&quot;reference external&quot; href=&quot;https://developer.fedoraproject.org/tech/languages/python/multiple-pythons.html&quot; style=&quot;border-bottom: 1px dotted rgb(0, 75, 107); color: #004b6b; text-decoration-line: none;&quot;&gt;multiple Python versions available in Fedora&lt;/a&gt;.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #3e4349; font-family: &amp;quot;goudy old style&amp;quot;, &amp;quot;minion pro&amp;quot;, &amp;quot;bell mt&amp;quot;, Georgia, &amp;quot;Hiragino Mincho Pro&amp;quot;, serif; font-size: 17px; line-height: 1.4em;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #3e4349; font-family: &amp;quot;goudy old style&amp;quot;, &amp;quot;minion pro&amp;quot;, &amp;quot;bell mt&amp;quot;, Georgia, &amp;quot;Hiragino Mincho Pro&amp;quot;, serif; font-size: 17px; line-height: 1.4em;&quot;&gt;&lt;ol style=&quot;color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 16px; margin-bottom: 0px; margin-top: 0px; text-align: justify;&quot;&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: #050505; font-family: Arial; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;https://mateisoscel.blogspot.com/2020/12/ce-sa-mai-citim.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 18pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Ce să mai citim?&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;a href=&quot;https://mateisoscel.blogspot.com/2020/12/ce-sa-mai-citim.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Ce să mai citim?&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;a href=&quot;https://anunturigratuitenet.blogspot.com/2012/09/specialisti-in-domeniul-it.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Tatăl fondator al Uniunii Europene.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;a href=&quot;https://alecscon.blogspot.com/2013/01/colonizarea-de-pe-marte.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Colonizarea de pe Marte !&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #050505; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;https://alecscon.blogspot.com/2012/08/robot-pe-marte.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Ne pregătim pentru Marte&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;a href=&quot;https://alecscon.blogspot.com/2012/08/robot-pe-marte.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Colonizarea Marte poate determina umanitatea să-și modifice ADN-ul ?&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: #050505; font-family: Arial; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;a href=&quot;https://blogulucovid.blogspot.com/2020/12/cine-mai-uraste-sa-poarte-o-masca.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;Cine mai urăște să poarte mască?&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;working-with-python-3&quot; style=&quot;background-color: white; color: #3e4349; font-family: &amp;quot;goudy old style&amp;quot;, &amp;quot;minion pro&amp;quot;, &amp;quot;bell mt&amp;quot;, Georgia, &amp;quot;Hiragino Mincho Pro&amp;quot;, serif; font-size: 17px;&quot;&gt;
&lt;h2 style=&quot;font-family: Garamond, Georgia, serif; font-size: 30.6px; font-weight: normal; margin: 30px 0px 10px; padding: 0px;&quot;&gt;
Working with Python 3&lt;a class=&quot;headerlink&quot; href=&quot;http://docs.python-guide.org/en/latest/starting/install3/linux/#working-with-python-3&quot; style=&quot;color: #dddddd; padding: 0px 4px; text-decoration-line: none; visibility: hidden;&quot; title=&quot;Permalink to this headline&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div style=&quot;line-height: 1.4em;&quot;&gt;
At this point, you may have system Python 2.7 available as well.&lt;/div&gt;
&lt;div class=&quot;highlight-console&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial;&quot;&gt;
&lt;pre style=&quot;background: rgb(238, 238, 238); font-family: Consolas, Menlo, &amp;quot;Deja Vu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, monospace; font-size: 0.9em; line-height: 1.3em; margin-bottom: 15px; margin-top: 15px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 7px 30px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #745334;&quot;&gt;$&lt;/span&gt; python
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 1.4em;&quot;&gt;
This will launch the Python 2 interpreter.&lt;/div&gt;
&lt;div class=&quot;highlight-console&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial;&quot;&gt;
&lt;pre style=&quot;background: rgb(238, 238, 238); font-family: Consolas, Menlo, &amp;quot;Deja Vu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, monospace; font-size: 0.9em; line-height: 1.3em; margin-bottom: 15px; margin-top: 15px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 7px 30px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #745334;&quot;&gt;$&lt;/span&gt; python3
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 1.4em;&quot;&gt;
This will launch the Python 3 interpreter.&lt;/div&gt;
&lt;div style=&quot;line-height: 1.4em;&quot;&gt;
Python 2.7.9 and later (on the python2 series), and Python 3.4 and later include pip by default.&lt;/div&gt;
&lt;div style=&quot;line-height: 1.4em;&quot;&gt;
To see if pip is installed, open a command prompt and run&lt;/div&gt;
&lt;div class=&quot;highlight-console&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial;&quot;&gt;
&lt;pre style=&quot;background: rgb(238, 238, 238); font-family: Consolas, Menlo, &amp;quot;Deja Vu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, monospace; font-size: 0.9em; line-height: 1.3em; margin-bottom: 15px; margin-top: 15px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 7px 30px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #745334;&quot;&gt;$&lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #004461;&quot;&gt;command&lt;/span&gt; -v pip
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 1.4em;&quot;&gt;
To install pip,&amp;nbsp;&lt;a class=&quot;reference external&quot; href=&quot;https://pip.pypa.io/en/latest/installing/&quot; style=&quot;border-bottom: 1px dotted rgb(0, 75, 107); color: #004b6b; text-decoration-line: none;&quot;&gt;follow the official pip installation guide&lt;/a&gt;&amp;nbsp;- this will automatically install the latest version of setuptools.&lt;/div&gt;
&lt;div style=&quot;line-height: 1.4em;&quot;&gt;
Note that on some Linux distributions including Ubuntu and Fedora the&amp;nbsp;&lt;code class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; color: #222222; font-family: Consolas, Menlo, &amp;quot;Deja Vu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, monospace; font-size: 0.9em;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;pip&lt;/span&gt;&lt;/code&gt;&amp;nbsp;command is meant for Python 2, while the&amp;nbsp;&lt;code class=&quot;docutils literal&quot; style=&quot;background-color: #ecf0f3; color: #222222; font-family: Consolas, Menlo, &amp;quot;Deja Vu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, monospace; font-size: 0.9em;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;pip3&lt;/span&gt;&lt;/code&gt;&amp;nbsp;command is meant for Python 3.&lt;/div&gt;
&lt;div class=&quot;highlight-console&quot;&gt;
&lt;div class=&quot;highlight&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial;&quot;&gt;
&lt;pre style=&quot;background: rgb(238, 238, 238); font-family: Consolas, Menlo, &amp;quot;Deja Vu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, monospace; font-size: 0.9em; line-height: 1.3em; margin-bottom: 15px; margin-top: 15px; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 7px 30px;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;color: #745334;&quot;&gt;$&lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;color: #004461;&quot;&gt;command&lt;/span&gt; -v pip3&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3 class=&quot;r&quot; style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 18px; font-weight: normal; margin: 0px; overflow: hidden; padding: 0px; text-overflow: ellipsis; white-space: nowrap;&quot;&gt;
&lt;a data-href=&quot;https://www.youtube.com/watch?v=dX2-V2BocqQ&quot; href=&quot;https://www.google.ro/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=19&amp;amp;cad=rja&amp;amp;uact=8&amp;amp;ved=0ahUKEwjZvcjIj-nYAhXIEVAKHfuYAmIQtwIIlQEwEg&amp;amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DdX2-V2BocqQ&amp;amp;usg=AOvVaw2ZzwsCqrOOgHeA-9FdZu1I&quot; style=&quot;color: #660099;&quot;&gt;How to Download and Install Python 3.6 on Windows 10&amp;nbsp;&lt;/a&gt;&lt;/h3&gt;
&lt;h1 class=&quot;entry-title&quot; style=&quot;background-color: white; box-sizing: inherit; clear: both; color: #404040; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 26px; line-height: 32px; margin: 0px;&quot;&gt;
&lt;a href=&quot;https://www.howtogeek.com/197947/how-to-install-python-on-windows/&quot; style=&quot;background-color: transparent; box-sizing: inherit; color: blue; outline: 0px; text-decoration-line: none;&quot;&gt;Cum se instalează Python pe Windows&lt;/a&gt;&lt;/h1&gt;
&lt;div&gt;
&lt;div style=&quot;background-color: white; box-sizing: inherit; color: #404040; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 16px; margin-bottom: 1.5em;&quot;&gt;
&lt;span style=&quot;box-sizing: inherit; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: inherit; vertical-align: inherit;&quot;&gt;Python nu vine preambalat cu Windows, dar asta nu înseamnă că utilizatorii Windows nu vor găsi limbajul de programare flexibil util.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: inherit; vertical-align: inherit;&quot;&gt;Nu este chiar atât de simplu ca instalarea celei mai noi versiuni, deci asigurați-vă că obțineți instrumentele potrivite pentru sarcina la îndemână.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: inherit; color: #404040; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 16px; margin-bottom: 1.5em;&quot;&gt;
&lt;span style=&quot;box-sizing: inherit; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: inherit; vertical-align: inherit;&quot;&gt;Primul lansat în 1991, Python este un popular limbaj de programare la nivel înalt utilizat pentru programarea generală.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: inherit; vertical-align: inherit;&quot;&gt;Datorită unei filozofii de design care accentuează lizibilitatea, aceasta a fost mult timp un favorit al programatorilor de hobby și al programatorilor grave.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: inherit; vertical-align: inherit;&quot;&gt;Nu numai că este un limbaj ușor (comparativ vorbind, că este) de a ridica, dar veți găsi mii de proiecte online care necesită ai instalat Python pentru a utiliza programul.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: inherit; color: #404040; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 16px; margin-bottom: 1.5em;&quot;&gt;
&lt;span style=&quot;box-sizing: inherit; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: inherit; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: inherit; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: inherit; vertical-align: inherit;&quot;&gt;Versiunea pe care o doriți depinde de scopul final.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: inherit; vertical-align: inherit;&quot;&gt;Să spunem, de exemplu, că ați citit&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a href=&quot;https://www.howtogeek.com/212073/add-dungeons-ruins-and-treasure-hunts-to-your-minecraft-world-with-mcdungeon/&quot; style=&quot;box-sizing: inherit; color: #114491; display: inline;&quot;&gt;&lt;span style=&quot;box-sizing: inherit; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: inherit; vertical-align: inherit;&quot;&gt;articolul despre extinderea lumii Minecraft cu MCDungeon&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;box-sizing: inherit; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: inherit; vertical-align: inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;și&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;https://www.howtogeek.com/212073/add-dungeons-ruins-and-treasure-hunts-to-your-minecraft-world-with-mcdungeon/&quot; style=&quot;background-color: transparent; box-sizing: inherit; color: #114491;&quot;&gt;&lt;span style=&quot;box-sizing: inherit; vertical-align: inherit;&quot;&gt;sunteți&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;box-sizing: inherit; vertical-align: inherit;&quot;&gt;încântați să adăugați lucruri reci în lumile voastre.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: inherit; vertical-align: inherit;&quot;&gt;Proiectul este codificat în Python și necesită Python 2.7 - nu puteți rula proiectul MCDungeon cu Python 3.6.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: inherit; vertical-align: inherit;&quot;&gt;De fapt, dacă explorați proiecte de hobby ca MCDungeon, veți găsi că aproape toți aceștia utilizează 2.7.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: inherit; vertical-align: inherit;&quot;&gt;Dacă obiectivul dvs. este să obțineți un proiect care se termină într-o extensie &quot;.py&quot;, atunci există o&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: inherit; vertical-align: inherit;&quot;&gt;&amp;nbsp;sansă&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em style=&quot;box-sizing: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: inherit; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: inherit; vertical-align: inherit;&quot;&gt;foarte&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;box-sizing: inherit; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: inherit; vertical-align: inherit;&quot;&gt;&amp;nbsp;bună, veți avea nevoie de 2.7 pentru aceasta.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot; style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;background-color: white; color: blue; font-weight: 700; text-align: -webkit-center;&quot;&gt;NCURSES Programming HOWTO&lt;/span&gt;&lt;span style=&quot;background-color: white; font-weight: 700; text-align: -webkit-center;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h1 class=&quot;SECT1&quot; style=&quot;background-color: white; text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/awordwindows.html&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;A Word about Windows&lt;/span&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;font-weight: 700; text-align: -webkit-center;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot;&gt;Before we plunge into the myriad ncurses functions, let me clear few things about windows. Windows are explained in detail in following&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/windows.html&quot;&gt;sections&lt;/a&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot;&gt;A Window is an imaginary screen defined by curses system. A window does not mean a bordered window which you usually see on Win9X platforms. When curses is initialized, it creates a default window named&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;LITERAL&quot;&gt;stdscr&lt;/tt&gt;&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot;&gt;&amp;nbsp;which represents your 80x25 (or the size of window in which you are running) screen. If you are doing simple tasks like printing few strings, reading input etc., you can safely use this single window for all of your purposes. You can also create windows and call functions which explicitly work on the specified window.&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot;&gt;For example, if you call&lt;/span&gt;&lt;/div&gt;
&lt;table bgcolor=&quot;#E0E0E0&quot; border=&quot;0&quot; style=&quot;width: 100%px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;PROGRAMLISTING&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;b&gt;printw(&quot;Hi There !!!&quot;);
    refresh();&lt;/b&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
It prints the string on stdscr at the present cursor position. Similarly the call to refresh(), works on stdscr only.&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
Say you have created&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/windows.html&quot;&gt;windows&lt;/a&gt;&amp;nbsp;then you have to call a function with a &#39;w&#39; added to the usual function.&lt;/div&gt;
&lt;table bgcolor=&quot;#E0E0E0&quot; border=&quot;0&quot; style=&quot;width: 100%px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;PROGRAMLISTING&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;b&gt; wprintw(win, &quot;Hi There !!!&quot;);
    wrefresh(win);&lt;/b&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
As you will see in the rest of the document, naming of functions follow the same convention. For each function there usually are three more functions.&lt;/div&gt;
&lt;table bgcolor=&quot;#E0E0E0&quot; border=&quot;0&quot; style=&quot;width: 100%px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;PROGRAMLISTING&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;b&gt;printw(string);        /* Print on stdscr at present cursor position */
    mvprintw(y, x, string);/* Move to (y, x) then print string     */
    wprintw(win, string);  /* Print on window win at present cursor position */
                           /* in the window */
    mvwprintw(win, y, x, string);   /* Move to (y, x) relative to window */
                                    /* co-ordinates and then print         */&lt;/b&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
Usually the w-less functions are macros which expand to corresponding w-function with stdscr as the window parameter.&lt;/div&gt;
&lt;br /&gt;
&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/intro.html&quot;&gt;Introduction&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;In the olden days of teletype terminals, terminals were away from computers and were connected to them through serial cables. The terminals could be configured by sending a series of bytes. All the capabilities (such as moving the cursor to a new location, erasing part of the screen, scrolling the screen, changing modes etc.) of terminals could be accessed through these series of bytes. These control seeuqnces are usually called escape sequences, because they start with an escape(0x1B) character. Even today, with proper emulation, we can send escape sequences to the emulator and achieve the same effect on a terminal window.&lt;br /&gt;&lt;br /&gt;Suppose you wanted to print a line in color. Try typing this on your console.&lt;br /&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;b&gt;echo &quot;^[[0;31;40mIn Color&quot;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The first character is an escape character, which looks like two characters ^ and [. To be able to print it, you have to press CTRL+V and then the ESC key. All the others are normal printable characters. You should be able to see the string &quot;In Color&quot; in red. It stays that way and to revert back to the original mode type this.&lt;br /&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;b&gt;echo &quot;^[[0;37;40m&quot;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now, what do these magic characters mean? Difficult to comprehend? They might even be different for different terminals. So the designers of UNIX invented a mechanism named termcap. It is a file that lists all the capabilities of a particular terminal, along with the escape sequences needed to achieve a particular effect. In the later years, this was replaced by terminfo. Without delving too much into details, this mechanism allows application programs to query the terminfo database and obtain the control characters to be sent to a terminal or terminal emulator.&lt;/span&gt;&lt;br /&gt;
&lt;h2 class=&quot;SECT2&quot; style=&quot;background-color: white;&quot;&gt;
&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/helloworld.html&quot;&gt;Compiling With the NCURSES Library&lt;/a&gt;&lt;/h2&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
To use ncurses library functions, you have to include ncurses.h in your programs. To link the program with ncurses the flag -lncurses should be added.&lt;/div&gt;
&lt;table bgcolor=&quot;#E0E0E0&quot; border=&quot;0&quot; style=&quot;width: 100%px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;PROGRAMLISTING&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;b&gt; #include &amp;lt;ncurses.h&amp;gt;
    .
    .
    .

    compile and link: gcc &amp;lt;program file&amp;gt; -lncurses&lt;/b&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;EXAMPLE&quot; style=&quot;background-color: white;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/null&quot; name=&quot;BHW&quot;&gt;&lt;/a&gt;&lt;b&gt;Example 1. The Hello World !!! Program&lt;/b&gt;&lt;br /&gt;
&lt;table bgcolor=&quot;#E0E0E0&quot; border=&quot;0&quot; style=&quot;width: 100%px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;pre class=&quot;PROGRAMLISTING&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;INLINEMEDIAOBJECT&quot; style=&quot;color: blue;&quot;&gt;&lt;b&gt;#include &amp;lt;ncurses.h&amp;gt;

int main()
{ 
 initscr();   /* Start curses mode     */
 printw(&quot;Hello World !!!&quot;); /* Print Hello World    */
 refresh();   /* Print it on to the real screen */
 getch();   /* Wait for user input */
 endwin();   /* End curses mode    */

 return 0;
}&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;SECT1&quot;&gt;
&lt;div class=&quot;SECT2&quot;&gt;
&lt;br /&gt;
&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot;&gt;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/init.html&quot;&gt;An Example&lt;/a&gt;  &lt;br /&gt;Let&#39;s write a program which will clarify the usage of these functions.&lt;br /&gt;Example 2. Initialization Function Usage example&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;EXAMPLE&quot;&gt;
&lt;table bgcolor=&quot;#E0E0E0&quot; border=&quot;0&quot; style=&quot;width: 100%px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;pre class=&quot;PROGRAMLISTING&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;INLINEMEDIAOBJECT&quot; style=&quot;color: blue;&quot;&gt;&lt;b&gt;#include &amp;lt;ncurses.h&amp;gt;

int main()
{ int ch;

 initscr();   /* Start curses mode   */
 raw();    /* Line buffering disabled */
 keypad(stdscr, TRUE);  /* We get F1, F2 etc..  */
 noecho();   /* Don&#39;t echo() while we do getch */

     printw(&quot;Type any character to see it in bold\n&quot;);
 ch = getch();   /* If raw() hadn&#39;t been called
      * we have to press enter before it
      * gets to the program   */
 if(ch == KEY_F(1))  /* Without keypad enabled this will */
  printw(&quot;F1 Key pressed&quot;);/*  not get to us either */
     /* Without noecho() some ugly escape
      * charachters might have been printed
      * on screen   */
 else
 { printw(&quot;The pressed key is &quot;);
  attron(A_BOLD);
  printw(&quot;%c&quot;, ch);
  attroff(A_BOLD);
 }
 refresh();   /* Print it on to the real screen */
     getch();   /* Wait for user input */
 endwin();   /* End curses mode    */

 return 0;
}&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
This program is self-explanatory. But I used functions which aren&#39;t explained yet. The function&amp;nbsp;&lt;tt class=&quot;LITERAL&quot;&gt;getch()&lt;/tt&gt;&amp;nbsp;is used to get a character from user. It is equivalent to normal&amp;nbsp;&lt;tt class=&quot;LITERAL&quot;&gt;getchar()&lt;/tt&gt;&amp;nbsp;except that we can disable the line buffering to avoid &amp;lt;enter&amp;gt; after input. Look for more about&amp;nbsp;&lt;tt class=&quot;LITERAL&quot;&gt;getch()&lt;/tt&gt;and reading keys in the&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/keys.html&quot;&gt;key management section&amp;nbsp;&lt;/a&gt;. The functions attron and attroff are used to switch some attributes on and off respectively. In the example I used them to print the character in bold. These functions are explained in detail later.&lt;br /&gt;
&lt;br /&gt;
&lt;h1 class=&quot;TITLE&quot; style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;color: blue; font-weight: normal;&quot;&gt;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/index.html&quot;&gt;NCURSES Programming HOWTO&lt;/a&gt;&lt;/span&gt;&lt;/h1&gt;
&lt;br /&gt;
&lt;dt style=&quot;background-color: white; text-align: center;&quot;&gt;&lt;b&gt;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/index.html&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Table of Contents&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;/dt&gt;
&lt;dt style=&quot;background-color: white;&quot;&gt;1.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/intro.html&quot;&gt;Introduction&lt;/a&gt;&lt;/dt&gt;
&lt;dd style=&quot;background-color: white;&quot;&gt;
&lt;dl&gt;
&lt;dt&gt;1.1.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/intro.html#WHATIS&quot;&gt;What is NCURSES?&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;1.2.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/intro.html#WHATCANWEDO&quot;&gt;What we can do with NCURSES&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;1.3.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/intro.html#WHERETOGETIT&quot;&gt;Where to get it&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;1.4.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/intro.html#PURPOSE&quot;&gt;Purpose/Scope of the document&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;1.5.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/intro.html#ABOUTPROGRAMS&quot;&gt;About the Programs&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;1.6.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/intro.html#OTHERFORMATS&quot;&gt;Other Formats of the document&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;1.7.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/intro.html#CREDITS&quot;&gt;Credits&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;1.8.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/intro.html#WISHLIST&quot;&gt;Wish List&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;1.9.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/intro.html#COPYRIGHT&quot;&gt;Copyright&lt;/a&gt;&lt;/dt&gt;
&lt;/dl&gt;
&lt;/dd&gt;
&lt;dt style=&quot;background-color: white;&quot;&gt;2.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/helloworld.html&quot;&gt;Hello World !!!&lt;/a&gt;&lt;/dt&gt;
&lt;dd style=&quot;background-color: white;&quot;&gt;
&lt;dl&gt;
&lt;dt&gt;2.1.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/helloworld.html#COMPILECURSES&quot;&gt;Compiling With the NCURSES Library&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;2.2.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/helloworld.html#DISSECTION&quot;&gt;Dissection&lt;/a&gt;&lt;/dt&gt;
&lt;/dl&gt;
&lt;/dd&gt;
&lt;dt style=&quot;background-color: white;&quot;&gt;3.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/gory.html&quot;&gt;The Gory Details&lt;/a&gt;&lt;/dt&gt;
&lt;dt style=&quot;background-color: white;&quot;&gt;4.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/init.html&quot;&gt;Initialization&lt;/a&gt;&lt;/dt&gt;
&lt;dd style=&quot;background-color: white;&quot;&gt;
&lt;dl&gt;
&lt;dt&gt;4.1.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/init.html#ABOUTINIT&quot;&gt;Initialization functions&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;4.2.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/init.html#RAWCBREAK&quot;&gt;raw() and cbreak()&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;4.3.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/init.html#ECHONOECHO&quot;&gt;echo() and noecho()&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;4.4.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/init.html#KEYPAD&quot;&gt;keypad()&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;4.5.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/init.html#HALFDELAY&quot;&gt;halfdelay()&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;4.6.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/init.html#MISCINIT&quot;&gt;Miscellaneous Initialization functions&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;4.7.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/init.html#INITEX&quot;&gt;An Example&lt;/a&gt;&lt;/dt&gt;
&lt;/dl&gt;
&lt;/dd&gt;
&lt;dt style=&quot;background-color: white;&quot;&gt;5.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/awordwindows.html&quot;&gt;A Word about Windows&lt;/a&gt;&lt;/dt&gt;
&lt;dt style=&quot;background-color: white;&quot;&gt;6.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/printw.html&quot;&gt;Output functions&lt;/a&gt;&lt;/dt&gt;
&lt;dd style=&quot;background-color: white;&quot;&gt;
&lt;dl&gt;
&lt;dt&gt;6.1.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/printw.html#ADDCHCLASS&quot;&gt;addch() class of functions&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;6.2.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/printw.html#AEN298&quot;&gt;mvaddch(), waddch() and mvwaddch()&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;6.3.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/printw.html#PRINTWCLASS&quot;&gt;printw() class of functions&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;6.4.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/printw.html#ADDSTRCLASS&quot;&gt;addstr() class of functions&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;6.5.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/printw.html#ACAUTION&quot;&gt;A word of caution&lt;/a&gt;&lt;/dt&gt;
&lt;/dl&gt;
&lt;/dd&gt;
&lt;dt style=&quot;background-color: white;&quot;&gt;7.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/scanw.html&quot;&gt;Input functions&lt;/a&gt;&lt;/dt&gt;
&lt;dd style=&quot;background-color: white;&quot;&gt;
&lt;dl&gt;
&lt;dt&gt;7.1.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/scanw.html#GETCHCLASS&quot;&gt;getch() class of functions&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;7.2.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/scanw.html#SCANWCLASS&quot;&gt;scanw() class of functions&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;7.3.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/scanw.html#GETSTRCLASS&quot;&gt;getstr() class of functions&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;7.4.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/scanw.html#GETSTREX&quot;&gt;Some examples&lt;/a&gt;&lt;/dt&gt;
&lt;/dl&gt;
&lt;/dd&gt;
&lt;dt style=&quot;background-color: white;&quot;&gt;8.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/attrib.html&quot;&gt;Attributes&lt;/a&gt;&lt;/dt&gt;
&lt;dd style=&quot;background-color: white;&quot;&gt;
&lt;dl&gt;
&lt;dt&gt;8.1.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/attrib.html#ATTRIBDETAILS&quot;&gt;The details&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;8.2.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/attrib.html#ATTRONVSATTRSET&quot;&gt;attron() vs attrset()&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;8.3.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/attrib.html#ATTR_GET&quot;&gt;attr_get()&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;8.4.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/attrib.html#ATTR_FUNCS&quot;&gt;attr_ functions&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;8.5.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/attrib.html#WATTRFUNCS&quot;&gt;wattr functions&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;8.6.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/attrib.html#CHGAT&quot;&gt;chgat() functions&lt;/a&gt;&lt;/dt&gt;
&lt;/dl&gt;
&lt;/dd&gt;
&lt;dt style=&quot;background-color: white;&quot;&gt;9.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/windows.html&quot;&gt;Windows&lt;/a&gt;&lt;/dt&gt;
&lt;dd style=&quot;background-color: white;&quot;&gt;
&lt;dl&gt;
&lt;dt&gt;9.1.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/windows.html#WINDOWBASICS&quot;&gt;The basics&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;9.2.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/windows.html#LETBEWINDOW&quot;&gt;Let there be a Window !!!&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;9.3.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/windows.html#BORDEREXEXPL&quot;&gt;Explanation&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;9.4.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/windows.html#OTHERSTUFF&quot;&gt;The other stuff in the example&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;9.5.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/windows.html#OTHERBORDERFUNCS&quot;&gt;Other Border functions&lt;/a&gt;&lt;/dt&gt;
&lt;/dl&gt;
&lt;/dd&gt;
&lt;dt style=&quot;background-color: white;&quot;&gt;10.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/color.html&quot;&gt;Colors&lt;/a&gt;&lt;/dt&gt;
&lt;dd style=&quot;background-color: white;&quot;&gt;
&lt;dl&gt;
&lt;dt&gt;10.1.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/color.html#COLORBASICS&quot;&gt;The basics&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;10.2.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/color.html#CHANGECOLORDEFS&quot;&gt;Changing Color Definitions&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;10.3.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/color.html#COLORCONTENT&quot;&gt;Color Content&lt;/a&gt;&lt;/dt&gt;
&lt;/dl&gt;
&lt;/dd&gt;
&lt;dt style=&quot;background-color: white;&quot;&gt;11.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/keys.html&quot;&gt;Interfacing with the key board&lt;/a&gt;&lt;/dt&gt;
&lt;dd style=&quot;background-color: white;&quot;&gt;
&lt;dl&gt;
&lt;dt&gt;11.1.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/keys.html#KEYSBASICS&quot;&gt;The Basics&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;11.2.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/keys.html#SIMPLEKEYEX&quot;&gt;A Simple Key Usage example&lt;/a&gt;&lt;/dt&gt;
&lt;/dl&gt;
&lt;/dd&gt;
&lt;dt style=&quot;background-color: white;&quot;&gt;12.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/mouse.html&quot;&gt;Interfacing with the mouse&lt;/a&gt;&lt;/dt&gt;
&lt;dd style=&quot;background-color: white;&quot;&gt;
&lt;dl&gt;
&lt;dt&gt;12.1.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/mouse.html#MOUSEBASICS&quot;&gt;The Basics&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;12.2.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/mouse.html#GETTINGEVENTS&quot;&gt;Getting the events&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;12.3.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/mouse.html#MOUSETOGETHER&quot;&gt;Putting it all Together&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;12.4.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/mouse.html#MISCMOUSEFUNCS&quot;&gt;Miscellaneous Functions&lt;/a&gt;&lt;/dt&gt;
&lt;/dl&gt;
&lt;/dd&gt;
&lt;dt style=&quot;background-color: white;&quot;&gt;13.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/screen.html&quot;&gt;Screen Manipulation&lt;/a&gt;&lt;/dt&gt;
&lt;dd style=&quot;background-color: white;&quot;&gt;
&lt;dl&gt;
&lt;dt&gt;13.1.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/screen.html#GETYX&quot;&gt;getyx() functions&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;13.2.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/screen.html#SCREENDUMP&quot;&gt;Screen Dumping&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;13.3.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/screen.html#WINDOWDUMP&quot;&gt;Window Dumping&lt;/a&gt;&lt;/dt&gt;
&lt;/dl&gt;
&lt;/dd&gt;
&lt;dt style=&quot;background-color: white;&quot;&gt;14.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/misc.html&quot;&gt;Miscellaneous features&lt;/a&gt;&lt;/dt&gt;
&lt;dd style=&quot;background-color: white;&quot;&gt;
&lt;dl&gt;
&lt;dt&gt;14.1.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/misc.html#CURSSET&quot;&gt;curs_set()&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;14.2.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/misc.html#TEMPLEAVE&quot;&gt;Temporarily Leaving Curses mode&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;14.3.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/misc.html#ACSVARS&quot;&gt;ACS_ variables&lt;/a&gt;&lt;/dt&gt;
&lt;/dl&gt;
&lt;/dd&gt;
&lt;dt style=&quot;background-color: white;&quot;&gt;15.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/otherlib.html&quot;&gt;Other libraries&lt;/a&gt;&lt;/dt&gt;
&lt;dt style=&quot;background-color: white;&quot;&gt;16.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/panels.html&quot;&gt;Panel Library&lt;/a&gt;&lt;/dt&gt;
&lt;dd style=&quot;background-color: white;&quot;&gt;
&lt;dl&gt;
&lt;dt&gt;16.1.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/panels.html#PANELBASICS&quot;&gt;The Basics&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;16.2.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/panels.html#COMPILEPANELS&quot;&gt;Compiling With the Panels Library&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;16.3.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/panels.html#PANELBROWSING&quot;&gt;Panel Window Browsing&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;16.4.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/panels.html#USERPTRUSING&quot;&gt;Using User Pointers&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;16.5.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/panels.html#PANELMOVERESIZE&quot;&gt;Moving and Resizing Panels&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;16.6.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/panels.html#PANELSHOWHIDE&quot;&gt;Hiding and Showing Panels&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;16.7.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/panels.html#PANELABOVE&quot;&gt;panel_above() and panel_below() Functions&lt;/a&gt;&lt;/dt&gt;
&lt;/dl&gt;
&lt;/dd&gt;
&lt;dt style=&quot;background-color: white;&quot;&gt;17.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/menus.html&quot;&gt;Menus Library&lt;/a&gt;&lt;/dt&gt;
&lt;dd style=&quot;background-color: white;&quot;&gt;
&lt;dl&gt;
&lt;dt&gt;17.1.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/menus.html#MENUBASICS&quot;&gt;The Basics&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;17.2.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/menus.html#COMPILEMENUS&quot;&gt;Compiling With the Menu Library&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;17.3.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/menus.html#MENUDRIVER&quot;&gt;Menu Driver: The work horse of the menu system&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;17.4.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/menus.html#MENUWINDOWS&quot;&gt;Menu Windows&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;17.5.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/menus.html#SCROLLMENUS&quot;&gt;Scrolling Menus&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;17.6.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/menus.html#MULTICOLUMN&quot;&gt;Multi Columnar Menus&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;17.7.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/menus.html#MULTIVALUEMENUS&quot;&gt;Multi Valued Menus&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;17.8.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/menus.html#MENUOPT&quot;&gt;Menu Options&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;17.9.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/menus.html#MENUUSERPTR&quot;&gt;The useful User Pointer&lt;/a&gt;&lt;/dt&gt;
&lt;/dl&gt;
&lt;/dd&gt;
&lt;dt style=&quot;background-color: white;&quot;&gt;18.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/forms.html&quot;&gt;Forms Library&lt;/a&gt;&lt;/dt&gt;
&lt;dd style=&quot;background-color: white;&quot;&gt;
&lt;dl&gt;
&lt;dt&gt;18.1.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/forms.html#FORMBASICS&quot;&gt;The Basics&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;18.2.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/forms.html#COMPILEFORMS&quot;&gt;Compiling With the Forms Library&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;18.3.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/forms.html#PLAYFIELDS&quot;&gt;Playing with Fields&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;18.4.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/forms.html#FORMWINDOWS&quot;&gt;Form Windows&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;18.5.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/forms.html#FILEDVALIDATE&quot;&gt;Field Validation&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;18.6.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/forms.html#FORMDRIVER&quot;&gt;Form Driver: The work horse of the forms system&lt;/a&gt;&lt;/dt&gt;
&lt;/dl&gt;
&lt;/dd&gt;
&lt;dt style=&quot;background-color: white;&quot;&gt;19.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/tools.html&quot;&gt;Tools and Widget Libraries&lt;/a&gt;&lt;/dt&gt;
&lt;dd style=&quot;background-color: white;&quot;&gt;
&lt;dl&gt;
&lt;dt&gt;19.1.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/tools.html#CDK&quot;&gt;CDK (Curses Development Kit)&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;19.2.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/tools.html#DIALOG&quot;&gt;The dialog&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;19.3.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/tools.html#PERLCURSES&quot;&gt;Perl Curses Modules CURSES::FORM and CURSES::WIDGETS&lt;/a&gt;&lt;/dt&gt;
&lt;/dl&gt;
&lt;/dd&gt;
&lt;dt style=&quot;background-color: white;&quot;&gt;20.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/justforfun.html&quot;&gt;Just For Fun !!!&lt;/a&gt;&lt;/dt&gt;
&lt;dd style=&quot;background-color: white;&quot;&gt;
&lt;dl&gt;
&lt;dt&gt;20.1.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/justforfun.html#GAMEOFLIFE&quot;&gt;The Game of Life&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;20.2.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/justforfun.html#MAGIC&quot;&gt;Magic Square&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;20.3.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/justforfun.html#HANOI&quot;&gt;Towers of Hanoi&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;20.4.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/justforfun.html#QUEENS&quot;&gt;Queens Puzzle&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;20.5.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/justforfun.html#SHUFFLE&quot;&gt;Shuffle&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;20.6.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/justforfun.html#TT&quot;&gt;Typing Tutor&lt;/a&gt;&lt;/dt&gt;
&lt;/dl&gt;
&lt;/dd&gt;
&lt;dt style=&quot;background-color: white;&quot;&gt;21.&amp;nbsp;&lt;a href=&quot;http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/ref.html&quot;&gt;References&lt;/a&gt;&lt;/dt&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #272727; font-family: &amp;quot;Roboto Condensed&amp;quot;, Arial, sans-serif; font-size: 18px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin-bottom: 1em; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;a href=&quot;https://www.tecmint.com/learn-python-programming-and-scripting-in-linux/&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Un alt mod în care puteți folosi Python în Linux este prin&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;border: 0px; color: #333333; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;IDLE&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;(mediul de dezvoltare integrat Python), o interfață grafică de utilizator pentru scrierea codului Python.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Înainte de instalare, este o idee bună să efectuați o căutare pentru a afla care sunt versiunile disponibile pentru distribuția dvs.:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;pre style=&quot;background-color: #051e30; border-color: rgb(40, 159, 244); border-image: initial; border-style: solid; border-width: 1px 1px 1px 4px; color: white; font-family: &amp;quot;Courier 10 Pitch&amp;quot;, Courier, monospace; font-size: 13px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: 19px; margin-bottom: 30px; margin-top: 30px; overflow-wrap: break-word; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 10px 10px 10px 18px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;# aptitude search idle     [&lt;span style=&quot;border: 0px; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: 600; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Debian&lt;/span&gt; and derivatives]
# yum search idle          [&lt;span style=&quot;border: 0px; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: 600; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;CentOS&lt;/span&gt; and &lt;span style=&quot;border: 0px; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: 600; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Fedora&lt;/span&gt;]
# dnf search idle          [&lt;span style=&quot;border: 0px; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: 600; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Fedora 23+&lt;/span&gt; version]&lt;/pre&gt;
&lt;pre style=&quot;background-color: #051e30; border-color: rgb(40, 159, 244); border-image: initial; border-style: solid; border-width: 1px 1px 1px 4px; color: white; font-family: &amp;quot;Courier 10 Pitch&amp;quot;, Courier, monospace; font-size: 13px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: 19px; margin-bottom: 30px; margin-top: 30px; overflow-wrap: break-word; overflow-x: auto; overflow-y: hidden; overflow: auto hidden; padding: 10px 10px 10px 18px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;$ sudo aptitude install idle-python3.2     &lt;/span&gt;&lt;span style=&quot;border: 0px; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: 600; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;# Folosesc Linux Mint 13&lt;/span&gt;
&lt;/pre&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #272727; font-family: &amp;quot;Roboto Condensed&amp;quot;, Arial, sans-serif; font-size: 18px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin-bottom: 1em; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;După instalare, veți vedea următorul ecran după lansarea&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;border: 0px; color: #333333; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;IDLE&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;În timp ce seamănă cu shell-ul Python, puteți face mai mult cu IDLE decât cu shell-ul.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;h1 style=&quot;background-color: white; color: #234764; font-family: Georgia, &amp;quot;Bitstream Vera Serif&amp;quot;, &amp;quot;New York&amp;quot;, Palatino, serif; font-size: 23.4247px; line-height: 1em; margin: 0.7em 0px;&quot;&gt;
&lt;a href=&quot;https://pypi.python.org/pypi/python-parrot/1.0.0&quot;&gt;python-parrot 1.0.0&lt;/a&gt;&lt;/h1&gt;
&lt;div id=&quot;download-button&quot; style=&quot;background-color: white; font-family: Arial, Verdana, Geneva, &amp;quot;Bitstream Vera Sans&amp;quot;, Helvetica, sans-serif; font-size: 14.6404px;&quot;&gt;
&lt;a class=&quot;button green&quot; href=&quot;https://pypi.python.org/packages/86/82/00626b8315628c8baee865a85acc1581edcbe3dc54cbafd9981e7008ce0b/python-parrot-1.0.0.tar.gz&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgb(125, 183, 47)), to(rgb(78, 125, 14))); border-radius: 0.5em; border: 1px solid rgb(83, 131, 18); box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 2px; color: #e8f0de; display: inline-block; float: right; font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 14px; margin: 0px 2px; outline: none; padding: 0.5em 2em 0.55em; text-align: center; text-decoration-line: none; text-shadow: rgba(0, 0, 0, 0.3) 0px 1px 1px; vertical-align: baseline; zoom: 1;&quot;&gt;&lt;b&gt;Download&lt;br /&gt;&lt;span style=&quot;font-size: 10.5px;&quot;&gt;python-parrot-1.0.0.tar.gz&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: Arial, Verdana, Geneva, &amp;quot;Bitstream Vera Sans&amp;quot;, Helvetica, sans-serif; font-size: 14.6404px; font-style: italic; line-height: 1.5;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Parrot este un server HTTP simplu care răspunde la cererile cu un nume de fișier specificat&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: Arial, Verdana, Geneva, &amp;quot;Bitstream Vera Sans&amp;quot;, Helvetica, sans-serif; font-size: 14.6404px; line-height: 1.5;&quot;&gt;
&lt;strong&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Ultima versiune:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;a href=&quot;https://pypi.python.org/pypi/python-parrot/1.0.2&quot; style=&quot;border-bottom: 1px dashed rgb(204, 204, 204); color: #551a8b; text-decoration-line: none;&quot; title=&quot;Latest Version URL&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;1.0.2&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;a href=&quot;https://pypi.python.org/pypi/python-parrot/1.0.2&quot; style=&quot;border-bottom: 1px dashed rgb(204, 204, 204); color: #551a8b; text-decoration-line: none;&quot; title=&quot;Ultimele URL de versiune&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: Arial, Verdana, Geneva, &amp;quot;Bitstream Vera Sans&amp;quot;, Helvetica, sans-serif; font-size: 14.6404px; line-height: 1.5;&quot;&gt;
&lt;a href=&quot;https://www.youtu.be/npjOSLCR2hE&quot; rel=&quot;nofollow&quot; style=&quot;border-bottom: 1px dashed rgb(204, 204, 204); color: #551a8b; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;parrot&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;este un server HTTP simplu care răspunde la orice solicitare GET validă cu fișierul specificat pe linia de comandă.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: Arial, Verdana, Geneva, &amp;quot;Bitstream Vera Sans&amp;quot;, Helvetica, sans-serif; font-size: 14.6404px; line-height: 1.5;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Este utilă în timpul testelor (de exemplu, pentru a șterge o aplicație de server) sau pentru a efectua testarea clientului.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Atât fișierele text cât și fișierele binare sunt difuzate corect.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: Arial, Verdana, Geneva, &amp;quot;Bitstream Vera Sans&amp;quot;, Helvetica, sans-serif; font-size: 14.6404px; line-height: 1.5;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Singura ei dependență este&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;biblioteca&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;excelentă&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a href=&quot;https://github.com/ahupp/python-magic&quot; rel=&quot;nofollow&quot; style=&quot;border-bottom: 1px dashed rgb(204, 204, 204); color: #551a8b; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;de magie python&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;pentru ghicitul de tip mime.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Funcționează pe Python 3.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;pre style=&quot;background: rgb(240, 240, 240); margin-left: 2em; margin-right: 2em; padding: 10px;&quot;&gt;$ &lt;span style=&quot;color: blue;&quot;&gt;&lt;b&gt;pip install python-parrot&lt;/b&gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;div id=&quot;usage&quot; style=&quot;background-color: white; font-family: Arial, Verdana, Geneva, &amp;quot;Bitstream Vera Sans&amp;quot;, Helvetica, sans-serif; font-size: 14.6404px;&quot;&gt;
&lt;h2 style=&quot;color: #366d9c; font-family: Georgia, &amp;quot;Bitstream Vera Serif&amp;quot;, &amp;quot;New York&amp;quot;, Palatino, serif; font-size: 20.4966px; font-weight: normal; line-height: 1em; margin: 0.7em 0px;&quot;&gt;
Usage&lt;/h2&gt;
&lt;pre style=&quot;background: rgb(240, 240, 240); margin-left: 2em; margin-right: 2em; padding: 10px;&quot;&gt;$ parrot port filename
&lt;/pre&gt;
&lt;div style=&quot;line-height: 1.5;&quot;&gt;
The following arguments are required:&lt;/div&gt;
&lt;ul style=&quot;margin-left: 1em; padding-left: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 1.5; margin-left: 1em; padding-left: 0px;&quot;&gt;&lt;tt&gt;port&lt;/tt&gt;: Port to listen on&lt;/li&gt;
&lt;li style=&quot;line-height: 1.5; margin-left: 1em; padding-left: 0px;&quot;&gt;&lt;tt&gt;filename&lt;/tt&gt;: Filename of the data to send in response to all requests&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h1 style=&quot;background-color: #fcfcfc; border-bottom-color: rgb(153, 153, 153); border-bottom-style: solid; border-image: initial; border-left-color: initial; border-left-style: initial; border-right-color: initial; border-right-style: initial; border-top-color: initial; border-top-style: initial; border-width: 0px 0px 1px; font-family: Alegreya, serif; font-size: 40.32px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 2rem 0px; padding: 0px; text-align: center; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;a href=&quot;https://mhchem.github.io/MathJax-mhchem/&quot;&gt;MathJax / mhchem Manual&lt;/a&gt;&lt;/span&gt;&lt;/h1&gt;
&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot;&gt;Mhchem este un instrument de scriere a ecuațiilor chimice frumoase cu ușurință.&lt;br /&gt;Acesta este manualul pentru sintaxa de intrare a lui mhchem. &lt;br /&gt;Acesta acoperă versiunea 3.2.x a lui MathJax / mhchem.&lt;br /&gt;mhchem este o extensie terță parte pentru &lt;a href=&quot;https://mathjax.org/&quot;&gt;MathJax&lt;/a&gt; . Pentru informații despre cum să încărcați extensia și să faceți \cecomanda disponibilă, consultați documentele &lt;a href=&quot;http://docs.mathjax.org/en/latest/configuration.html#using-in-line-configuration-options&quot;&gt;oficiale MathJax&lt;/a&gt; . Pe scurt, utilizați această config:&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span face=&quot;&amp;quot;verdana&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: #fcfcfc; border: 0px; font-family: inherit; font-size: 22.4px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: &amp;quot;source code pro&amp;quot;, monospace; font-size: 20.16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px 0.2rem; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;b&gt;MathJax.Ajax.config.path[&quot;mhchem&quot;] =
  &quot;https://cdnjs.cloudflare.com/ajax/libs/mathjax-mhchem/3.2.0&quot;;
MathJax.Hub.Config({
  TeX: {
    extensions: [&quot;[mhchem]/mhchem.js&quot;]
  }
});&lt;/b&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: #fcfcfc; border: 0px; font-family: inherit; font-size: 22.4px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: &amp;quot;Source Code Pro&amp;quot;, monospace; font-size: 20.16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px 0.2rem; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;
&lt;/code&gt;&lt;/pre&gt;
ecuațiile chimice (ce)&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;b&gt;C O 2+C⟶2C OCOX2+C⟶2CO&lt;br /&gt;$\ce{CO2 + C -&amp;gt; 2 CO}$&lt;br /&gt;&lt;br /&gt;H g 2 +-→I -H g I 2-→I -[ H g I - amI 4] 2 -HgX2+→euX-HgeuX2→euX-[HgXeueueuX4]X2-&lt;br /&gt;$\ce{Hg^2+ -&amp;gt;[I-] HgI2 -&amp;gt;[I-] [Hg^{II}I4]^2-}$&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://infotestpc.blogspot.com/feeds/1611369218412127997/comments/default' title='Postare comentarii'/><link rel='replies' type='text/html' href='http://infotestpc.blogspot.com/2018/01/ecuatii-chimice.html#comment-form' title='0 comentarii'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5038728009841547747/posts/default/1611369218412127997'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5038728009841547747/posts/default/1611369218412127997'/><link rel='alternate' type='text/html' href='http://infotestpc.blogspot.com/2018/01/ecuatii-chimice.html' title='Programare - Secvențe și Exemple'/><author><name>Al Con</name><uri>http://www.blogger.com/profile/17409243868650327707</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkUL0zIc2nFI0y7S9FxVcfqJ1jDm1luI9hOjbRoAoY4QMDgo23JDc8N3663gna1gjKFz6yUaRYRTvvOocWZ3Z0LOml2wOyfLQ6JXC_mbzg4_s8gUGjeH75AL4oDvqJKK_m1o_d25NqdQ/s72-c/Comunicativ+1.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5038728009841547747.post-8294546901967287211</id><published>2012-10-07T15:08:00.000-07:00</published><updated>2024-07-09T09:13:09.358-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="BAZE DE DATE"/><category scheme="http://www.blogger.com/atom/ns#" term="HARDWARE"/><category scheme="http://www.blogger.com/atom/ns#" term="HTML"/><category scheme="http://www.blogger.com/atom/ns#" term="Internet"/><category scheme="http://www.blogger.com/atom/ns#" term="MikroElektronika"/><category scheme="http://www.blogger.com/atom/ns#" term="procesorul"/><category scheme="http://www.blogger.com/atom/ns#" term="programare"/><category scheme="http://www.blogger.com/atom/ns#" term="Retele"/><category scheme="http://www.blogger.com/atom/ns#" term="SEO"/><category scheme="http://www.blogger.com/atom/ns#" term="Server"/><category scheme="http://www.blogger.com/atom/ns#" term="Site"/><title type='text'>SEO - OPTIMIZAREA    PAGINII  WEB</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPNhfvX_O71ydyxXFIGCcIvGGP9_sd7tJMPl-CK36Xeyqf2VjSzprm22uYRcrOeyT_ggfjwP0koqx7Q6fYC3NGQ9NCOtaXiAeHFJ6hmJ6Utb24C_dNlAD5M6updkCIZjfqRui_eb3LqLYEOjobDPCMI35Hc98h8lalUWI7NXsIEMqYDYMckmlJse1n/s530/Trenul%20vie%C8%9Bii.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;328&quot; data-original-width=&quot;530&quot; height=&quot;198&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPNhfvX_O71ydyxXFIGCcIvGGP9_sd7tJMPl-CK36Xeyqf2VjSzprm22uYRcrOeyT_ggfjwP0koqx7Q6fYC3NGQ9NCOtaXiAeHFJ6hmJ6Utb24C_dNlAD5M6updkCIZjfqRui_eb3LqLYEOjobDPCMI35Hc98h8lalUWI7NXsIEMqYDYMckmlJse1n/s320/Trenul%20vie%C8%9Bii.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
Optimizarea on-site sau on-page este una dintre cele mai importante 
parti ale optimizarii pentru motoarele de cautare si trebuie sa fie 
facuta ok atat pentru motoarele de cautare, cat si pentru oamenii ce va 
vor citi site-ul. Bineinteles ca in functie de tipul site-ului 
(e-commerce, blog, site de prezentare etc…) , structura acestuia va fi 
diferita, insa va trebui sa aiba multe din urmatoarele elemente 
prezente.&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 4.8pt; margin-left: 0cm; margin-right: 0cm; margin-top: 4.8pt; margin: 4.8pt 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Motoarele de căutare sînt
  programate să utilizeze în mod optim baza de date obţinută de
  roboţii tîrîtori &lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;(indexatori) &lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;care &lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;analizează
  conţinutul&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt; paginil&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;or&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt; de pe internet. Scopul lor este
  să prezinte foarte rapid internauţilor liste cu pagini web în care
  primele locuri să fie ocupate de pagini cu un conţinut informativ&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;
  şi&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt; util&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;
  pentru tema căutată&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;. Deci algoritmul de sortare a paginilor trebuie să fie foarte
  bine conceput&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;,&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt; pentru că
  el are rolul de a sorta mii sau zeci de mii de pagini într-un timp foarte
  scurt şi cu un rezultat care să fie pe placul internauţilor. &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 4.8pt; margin-left: 0cm; margin-right: 0cm; margin-top: 4.8pt; margin: 4.8pt 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Un robot tîrîtor
  nu vede paginile web aşa cum le văd oamenii, el acordă o
  importanţă covîrşitoare textului unei pagini, fără a
  fi impresionat deloc de aspectul ei grafic. Ca urmare&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;,&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt; bazele de date ale motoarelor de
  căutare conţin pagini indexate după conţinutul lor scris şi
  nu după cel grafic. Acest conţinut scris este cel care dă 70%
  din relevan&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;ţ&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;a unei
  pagini web, restul de 30% fiind dat de optimizarea (&quot;cosmetizarea&quot;)
  paginii web. &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 4.8pt; margin-left: 0cm; margin-right: 0cm; margin-top: 4.8pt; margin: 4.8pt 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sarcina lingviştilor
  şi a matematicienilor implicaţi în dezvoltarea motoarelor de căutare
  a stat tocmai în crearea şi optimizarea unui algoritm care să poată
  să ordoneze un număr mare de pagini web în funcţie de
  utilitatea conţinutului lor scris. În mod evident, unele din
  caracteristicile algoritmului nu sînt uşor de sesizat de către
  persoanele care nu au lucrat la el. Alte caracteristici pot fi însă
  deduse analizînd paginile web care apar în mod constant pe primele locuri ale
  listelor generate de motoarele de căutare. &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 4.8pt; margin-left: 0cm; margin-right: 0cm; margin-top: 4.8pt; margin: 4.8pt 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Este uşor
  de intuit faptul c&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;ă&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt; algoritmul favorizează paginile web care au
  un conţinut &lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;mai mare &lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;de tex&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;t&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;, pentru că se consideră că aceste
  pagini conţin multă informaţie, iar internauţii caută
  în mod special această caracteristică a paginilor web. Nu se ştie
  precis cum este evaluat de către&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt; un anumit&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt; algoritm conţinutul de text
  al unei pagini&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;,&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt; dar este foarte posibil să fie luat în calcul
  numărul de caractere (litere) din pagin&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;ă,&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt; aşa cum a fost calculat de
  robotul tîrîtor care a indexat pagina. Asta nu înseamnă că paginile
  umpl&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;ute&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt; cu text
  pînă la refuz&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt; au un succes garantat în ce
  priveşte aprecierea lor de către motoarele de căutare. Trebuie&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt; să ţinem cont şi
  de alte aspecte, cum este de exemplu calitatea expunerii informaţiilor
  din textul respectiv. &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 4.8pt; margin-left: 0cm; margin-right: 0cm; margin-top: 4.8pt; margin: 4.8pt 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Paginile cu
  mult text sînt pe placul algoritmilor&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt; de căutare,&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt; dar oamenii sînt mai rafinaţi,
  ei preferă de cele mai multe ori o cantitate rezonabilă de text şi
  care în plus trebuie să fie interesant, util, bine scris şi
  formatat în aşa fel încît să fie plăcut de citit. Un alt
  aspect care nu trebuie neglijat este actualizarea periodică a con&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;ţ&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;inu&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;tu&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;lui sitului şi adăugarea
  de noi materiale.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Atunci cînd
  scriem textul dintr-o pagină trebuie să ne asigurăm că
  folosim &lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;inclusiv&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt; sinonime
  pentru cuvintele-cheie şi de asemenea că folosim şi variante
  mai puţin folosite ale acestora. De exemplu într-o pagină web care
  tratează un subiect despre siturile web (găzduire de ex.) trebuie
  folosit în principal cuvîntul &quot;sit&quot;&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;,&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt; dar trebuie pusă în
  paranteză şi varianta &quot;&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;site&lt;/i&gt;&quot;,
  încă destul de folosită&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;,&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt; deşi este incorectă. În acest fel
  dacă un internaut va c&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;ă&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;ut&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;a&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt; paginile care conţin sintagma
  &quot;găzduire &lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;site&lt;/i&gt; web&quot;&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;,&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt; avem toate şansele ca
  şi pagina noastră care tratează acest subiect să fie
  luată în seamă de motorul de căutare pentru includere&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;a&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt; pe lista rezul&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;t&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;atelor căutării.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: &amp;quot;Factor A&amp;quot;, Ubuntu, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #2b00fe; font-size: medium;&quot;&gt;Ce este SEO?&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; font-family: Inter, Ubuntu, Helvetica, Arial, sans-serif; font-size: 16.8px; margin: 0px 0px 22px; max-width: 660px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.semrush.com/blog/what-is-seo/&quot; style=&quot;background-color: transparent; box-sizing: inherit; color: rgb(255, 100, 45) !important; margin: 0px; padding: 0px; text-decoration-line: none !important;&quot;&gt;&lt;span style=&quot;box-sizing: inherit; margin: 0px; padding: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: inherit; margin: 0px; padding: 0px; vertical-align: inherit;&quot;&gt;SEO&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;box-sizing: inherit; margin: 0px; padding: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: inherit; margin: 0px; padding: 0px; vertical-align: inherit;&quot;&gt;&amp;nbsp;(search engine optimization) este procesul de îmbunătățire a performanței, experienței și autorității site-ului dvs., astfel încât să poată obține o vizibilitate mai bună în motoarele de căutare precum Google.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;p style=&quot;box-sizing: inherit; margin: 22px 0px; max-width: 660px; padding: 0px;&quot;&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;background-color: white; box-sizing: inherit; font-family: Inter, Ubuntu, Helvetica, Arial, sans-serif; font-size: 16.8px; margin: 0px; padding: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: inherit; margin: 0px; padding: 0px; vertical-align: inherit;&quot;&gt;Mai exact, SEO se referă la clasarea mai sus în rezultatele căutării organice (unpaid).&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;strong style=&quot;background-color: white; box-sizing: inherit; font-family: Inter, Ubuntu, Helvetica, Arial, sans-serif; font-size: 16.8px; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: inherit; margin: 0px; padding: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: inherit; margin: 0px; padding: 0px; vertical-align: inherit;&quot;&gt;Nu&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;background-color: white; box-sizing: inherit; font-family: Inter, Ubuntu, Helvetica, Arial, sans-serif; font-size: 16.8px; margin: 0px; padding: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: inherit; margin: 0px; padding: 0px; vertical-align: inherit;&quot;&gt;&amp;nbsp;rezultate plătite sau sponsorizate.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: &amp;quot;Factor A&amp;quot;, Ubuntu, Helvetica, Arial, sans-serif; font-size: large;&quot;&gt;De ce este important &lt;a href=&quot;https://www.semrush.com/blog/seo-basics/?kw=&amp;amp;cmp=EE_SRCH_DSA_Blog_New_EN&amp;amp;label=dsa_pagefeed&amp;amp;Network=g&amp;amp;Device=c&amp;amp;utm_content=683809340377&amp;amp;kwid=dsa-2264710307245&amp;amp;cmpid=21293495675&amp;amp;agpid=162281893613&amp;amp;BU=Core&amp;amp;extid=105138960475&amp;amp;adpos=&amp;amp;gad_source=1&amp;amp;gclid=Cj0KCQjwv7O0BhDwARIsAC0sjWO2jl9AFRgDEQKxvpfTkLeaSOuMKXadQbQkCCjzmCHg2UlywArVFLoaAm3rEALw_wcB&quot;&gt;SEO&lt;/a&gt;&amp;nbsp;?&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;SEO este important, deoarece poate aduce mai mult trafic, clienți potențiali, clienți și venituri pentru afacerea dvs. Chiar și strategiile SEO de bază pot oferi o rentabilitate uriașă a investiției.&amp;nbsp;&lt;a href=&quot;https://www.semrush.com/blog/seo-basics/?kw=&amp;amp;cmp=EE_SRCH_DSA_Blog_New_EN&amp;amp;label=dsa_pagefeed&amp;amp;Network=g&amp;amp;Device=c&amp;amp;utm_content=683809340377&amp;amp;kwid=dsa-2264710307245&amp;amp;cmpid=21293495675&amp;amp;agpid=162281893613&amp;amp;BU=Core&amp;amp;extid=105138960475&amp;amp;adpos=&amp;amp;gad_source=1&amp;amp;gclid=Cj0KCQjwv7O0BhDwARIsAC0sjWO2jl9AFRgDEQKxvpfTkLeaSOuMKXadQbQkCCjzmCHg2UlywArVFLoaAm3rEALw_wcB&quot;&gt;Sursa Info !&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;div class=&quot;___SFlex_1mtg5-red-team&quot; data-ui-name=&quot;Flex&quot; style=&quot;background-color: white; border: 0px; color: #191b23; display: flex; font-family: Inter, sans-serif; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-stretch: inherit; font-variant-alternates: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; font-variant-position: inherit; font-variation-settings: inherit; justify-content: center; line-height: inherit; margin: 0px 0px 12px; padding: 0px; vertical-align: initial;&quot;&gt;&lt;h1 class=&quot;___SBoxInline_wk8wn-red-team ___SText_nhabh-red-team _size_700_nhabh-red-team __color_nhabh-red-team __fontWeight_nhabh-red-team __textAlign_nhabh-red-team&quot; color=&quot;var(--gray-800, #191b23)&quot; data-at=&quot;title&quot; data-ui-name=&quot;Text&quot; font-weight=&quot;700&quot; size=&quot;700&quot; style=&quot;--color_nhabh: var(--gray-800, #191b23); --fontweight_nhabh: 700; --textalign_nhabh: center; border: 0px; color: var(--color_nhabh); display: inline-block; font-family: &amp;quot;Factor A&amp;quot;, sans-serif; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: var(--fontWeight_nhabh); line-height: var(--intergalactic-lh-700, 110%); margin: 0px; padding: 0px; text-align: var(--textAlign_nhabh); vertical-align: initial;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Cercetare organică&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;Vrei să ajungi în vârful SERP?&lt;/span&gt;&lt;/h1&gt;&lt;/div&gt;&lt;div class=&quot;___SFlex_1mtg5-red-team&quot; data-ui-name=&quot;Flex&quot; direction=&quot;column&quot; style=&quot;background-color: white; border: 0px; color: #191b23; display: flex; flex-direction: column; font-family: Inter, sans-serif; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: 12px; font-stretch: inherit; font-variant-alternates: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; font-variant-position: inherit; font-variation-settings: inherit; justify-content: center; line-height: inherit; margin: 0px; padding: 0px; vertical-align: initial;&quot;&gt;&lt;span class=&quot;___SText_nhabh-red-team _size_300_nhabh-red-team __fontSize_nhabh-red-team __textAlign_nhabh-red-team&quot; data-at=&quot;description&quot; data-ui-name=&quot;Text&quot; font-size=&quot;16px&quot; size=&quot;300&quot; style=&quot;--fontsize_nhabh: 16px; --textalign_nhabh: center; border: 0px; font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: var(--fontSize_nhabh); font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; line-height: var(--intergalactic-lh-300, 150%); margin: 0px; opacity: 1; padding: 0px; text-align: var(--textAlign_nhabh); transition: all 0.3s ease 0s; vertical-align: initial;&quot;&gt;&lt;p class=&quot;___SText_nhabh-red-team&quot; data-ui-name=&quot;Text&quot; style=&quot;border: 0px; font: inherit; margin: 0px; padding: 0px; vertical-align: initial;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Începeți cu a învăța ce funcționează cel mai bine pentru concurenții dvs.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;___SText_nhabh-red-team&quot; data-ui-name=&quot;Text&quot; style=&quot;border: 0px; font: inherit; margin: 0px; padding: 0px; vertical-align: initial;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;h2 class=&quot;___SBoxInline_wk8wn-red-team ___SText_nhabh-red-team _size_500_nhabh-red-team __fontWeight_nhabh-red-team&quot; data-at=&quot;title&quot; data-ui-name=&quot;Text&quot; font-weight=&quot;700&quot; size=&quot;500&quot; style=&quot;--fontweight_nhabh: 700; border: 0px; display: inline-block; font-family: &amp;quot;Factor A&amp;quot;; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: var(--intergalactic-fs-500, 24px); font-stretch: inherit; font-variant-alternates: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; font-variant-position: inherit; font-variation-settings: inherit; font-weight: var(--fontWeight_nhabh); line-height: var(--intergalactic-lh-500, 117%); margin: 0px 0px 12px; padding: 0px; text-align: start; vertical-align: initial;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Descoperiți cele mai bune cuvinte cheie ale concurenților&lt;/span&gt;&lt;/h2&gt;&lt;p class=&quot;___SText_nhabh-red-team&quot; data-ui-name=&quot;Text&quot; style=&quot;border: 0px; font: inherit; margin: 0px; padding: 0px; vertical-align: initial;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;ul class=&quot;___SList_3bu9y-red-team ___SText_nhabh-red-team _size_300_nhabh-red-team&quot; data-ui-name=&quot;List&quot; role=&quot;list&quot; size=&quot;300&quot; style=&quot;border: 0px; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: var(--intergalactic-fs-300, 16px); font-stretch: inherit; font-variant-alternates: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; font-variant-position: inherit; font-variation-settings: inherit; line-height: var(--intergalactic-lh-300, 150%); list-style: none; margin: 0px; opacity: 1; padding: 0px; text-align: start; transition: all 0.3s ease 0s; vertical-align: initial;&quot;&gt;&lt;li class=&quot;___SItem_3bu9y-red-team ___SText_nhabh-red-team&quot; data-ui-name=&quot;List.Item&quot; role=&quot;listitem&quot; style=&quot;border: 0px; display: flex; font: inherit; margin: 0px; padding: 0px; vertical-align: initial;&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;___SMarker_3bu9y-red-team&quot; style=&quot;border: 0px; color: var(--intergalactic-text-secondary, #6c6e79); font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: var(--intergalactic-spacing-2x, 8px); margin-top: 0px; padding: 0px; vertical-align: initial;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;•&lt;/span&gt;&lt;/span&gt;&lt;div class=&quot;___SContent_3bu9y-red-team&quot; style=&quot;border: 0px; font: inherit; margin: 0px; overflow: inherit; padding: 0px; text-overflow: inherit; vertical-align: initial;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Explorați clasamentele de cuvinte cheie ale rivalilor dvs. pe desktop și mobil&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class=&quot;___SItem_3bu9y-red-team ___SText_nhabh-red-team&quot; data-ui-name=&quot;List.Item&quot; role=&quot;listitem&quot; style=&quot;border: 0px; display: flex; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: var(--intergalactic-spacing-2x, 8px); padding: 0px; vertical-align: initial;&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;___SMarker_3bu9y-red-team&quot; style=&quot;border: 0px; color: var(--intergalactic-text-secondary, #6c6e79); font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: var(--intergalactic-spacing-2x, 8px); margin-top: 0px; padding: 0px; vertical-align: initial;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;•&lt;/span&gt;&lt;/span&gt;&lt;div class=&quot;___SContent_3bu9y-red-team&quot; style=&quot;border: 0px; font: inherit; margin: 0px; overflow: inherit; padding: 0px; text-overflow: inherit; vertical-align: initial;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Vizualizați paginile lor de destinație afișate în SERP-uri pentru un anumit cuvânt cheie&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class=&quot;___SItem_3bu9y-red-team ___SText_nhabh-red-team&quot; data-ui-name=&quot;List.Item&quot; role=&quot;listitem&quot; style=&quot;border: 0px; display: flex; font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; line-height: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: var(--intergalactic-spacing-2x, 8px); padding: 0px; vertical-align: initial;&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;___SMarker_3bu9y-red-team&quot; style=&quot;border: 0px; color: var(--intergalactic-text-secondary, #6c6e79); font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: var(--intergalactic-spacing-2x, 8px); margin-top: 0px; padding: 0px; vertical-align: initial;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;•&lt;/span&gt;&lt;/span&gt;&lt;div class=&quot;___SContent_3bu9y-red-team&quot; style=&quot;border: 0px; font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; line-height: inherit; margin: 0px; overflow: inherit; padding: 0px; text-overflow: inherit; vertical-align: initial;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;font-weight: inherit;&quot;&gt;Vedeți cât trafic aduce organic un termen de căutare.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class=&quot;___SItem_3bu9y-red-team ___SText_nhabh-red-team&quot; data-ui-name=&quot;List.Item&quot; role=&quot;listitem&quot; style=&quot;border: 0px; display: flex; font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; line-height: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: var(--intergalactic-spacing-2x, 8px); padding: 0px; vertical-align: initial;&quot;&gt;&lt;div class=&quot;___SContent_3bu9y-red-team&quot; style=&quot;border: 0px; font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; line-height: inherit; margin: 0px; overflow: inherit; padding: 0px; text-overflow: inherit; vertical-align: initial;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;font-weight: inherit;&quot;&gt;&lt;h2 class=&quot;___SBoxInline_wk8wn-red-team ___SText_nhabh-red-team _size_500_nhabh-red-team __fontWeight_nhabh-red-team&quot; data-at=&quot;title&quot; data-ui-name=&quot;Text&quot; font-weight=&quot;700&quot; size=&quot;500&quot; style=&quot;--fontweight_nhabh: 700; border: 0px; display: inline-block; font-family: &amp;quot;Factor A&amp;quot;; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: var(--intergalactic-fs-500, 24px); font-stretch: inherit; font-variant-alternates: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; font-variant-position: inherit; font-variation-settings: inherit; font-weight: var(--fontWeight_nhabh); line-height: var(--intergalactic-lh-500, 117%); margin: 0px 0px 12px; padding: 0px; vertical-align: initial;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Găsiți noi concurenți organici&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;ul class=&quot;___SList_3bu9y-red-team ___SText_nhabh-red-team _size_300_nhabh-red-team&quot; data-ui-name=&quot;List&quot; role=&quot;list&quot; size=&quot;300&quot; style=&quot;border: 0px; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: var(--intergalactic-fs-300, 16px); font-stretch: inherit; font-variant-alternates: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; font-variant-position: inherit; font-variation-settings: inherit; line-height: var(--intergalactic-lh-300, 150%); list-style: none; margin: 0px; opacity: 1; padding: 0px; transition: all 0.3s ease 0s; vertical-align: initial;&quot;&gt;&lt;li class=&quot;___SItem_3bu9y-red-team ___SText_nhabh-red-team&quot; data-ui-name=&quot;List.Item&quot; role=&quot;listitem&quot; style=&quot;border: 0px; display: flex; font: inherit; margin: 0px; padding: 0px; vertical-align: initial;&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;___SMarker_3bu9y-red-team&quot; style=&quot;border: 0px; color: var(--intergalactic-text-secondary, #6c6e79); font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: var(--intergalactic-spacing-2x, 8px); margin-top: 0px; padding: 0px; vertical-align: initial;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;•&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class=&quot;___SContent_3bu9y-red-team&quot; style=&quot;border: 0px; font: inherit; margin: 0px; overflow: inherit; padding: 0px; text-overflow: inherit; vertical-align: initial;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Păstrați o atenție deosebită asupra peisajului competitiv organic dinamic&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class=&quot;___SItem_3bu9y-red-team ___SText_nhabh-red-team&quot; data-ui-name=&quot;List.Item&quot; role=&quot;listitem&quot; style=&quot;border: 0px; display: flex; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: var(--intergalactic-spacing-2x, 8px); padding: 0px; vertical-align: initial;&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;___SMarker_3bu9y-red-team&quot; style=&quot;border: 0px; color: var(--intergalactic-text-secondary, #6c6e79); font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: var(--intergalactic-spacing-2x, 8px); margin-top: 0px; padding: 0px; vertical-align: initial;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;•&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class=&quot;___SContent_3bu9y-red-team&quot; style=&quot;border: 0px; font: inherit; margin: 0px; overflow: inherit; padding: 0px; text-overflow: inherit; vertical-align: initial;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Obțineți o reprezentare vizuală a locului în care se află site-ul dvs., printre alți jucători de căutare organică&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class=&quot;___SItem_3bu9y-red-team ___SText_nhabh-red-team&quot; data-ui-name=&quot;List.Item&quot; role=&quot;listitem&quot; style=&quot;border: 0px; display: flex; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: var(--intergalactic-spacing-2x, 8px); padding: 0px; vertical-align: initial;&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;___SMarker_3bu9y-red-team&quot; style=&quot;border: 0px; color: var(--intergalactic-text-secondary, #6c6e79); font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: var(--intergalactic-spacing-2x, 8px); margin-top: 0px; padding: 0px; vertical-align: initial;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;•&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class=&quot;___SContent_3bu9y-red-team&quot; style=&quot;border: 0px; font: inherit; margin: 0px; overflow: inherit; padding: 0px; text-overflow: inherit; vertical-align: initial;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Vedeți o listă de domenii cu care vă luptați pentru primele poziții în Google și Bing&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class=&quot;___SItem_3bu9y-red-team ___SText_nhabh-red-team&quot; data-ui-name=&quot;List.Item&quot; role=&quot;listitem&quot; style=&quot;border: 0px; display: flex; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: var(--intergalactic-spacing-2x, 8px); padding: 0px; vertical-align: initial;&quot;&gt;&lt;div class=&quot;___SContent_3bu9y-red-team&quot; style=&quot;border: 0px; font: inherit; margin: 0px; overflow: inherit; padding: 0px; text-overflow: inherit; vertical-align: initial;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;h2 class=&quot;___SBoxInline_wk8wn-red-team ___SText_nhabh-red-team _size_500_nhabh-red-team __fontWeight_nhabh-red-team&quot; data-at=&quot;title&quot; data-ui-name=&quot;Text&quot; font-weight=&quot;700&quot; size=&quot;500&quot; style=&quot;--fontweight_nhabh: 700; border: 0px; display: inline-block; font-family: &amp;quot;Factor A&amp;quot;; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: var(--intergalactic-fs-500, 24px); font-stretch: inherit; font-variant-alternates: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; font-variant-position: inherit; font-variation-settings: inherit; font-weight: var(--fontWeight_nhabh); line-height: var(--intergalactic-lh-500, 117%); margin: 0px 0px 12px; padding: 0px; vertical-align: initial;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Observați schimbările de poziție ale domeniilor&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;ul class=&quot;___SList_3bu9y-red-team ___SText_nhabh-red-team _size_300_nhabh-red-team&quot; data-ui-name=&quot;List&quot; role=&quot;list&quot; size=&quot;300&quot; style=&quot;border: 0px; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: var(--intergalactic-fs-300, 16px); font-stretch: inherit; font-variant-alternates: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; font-variant-position: inherit; font-variation-settings: inherit; line-height: var(--intergalactic-lh-300, 150%); list-style: none; margin: 0px; opacity: 1; padding: 0px; transition: all 0.3s ease 0s; vertical-align: initial;&quot;&gt;&lt;li class=&quot;___SItem_3bu9y-red-team ___SText_nhabh-red-team&quot; data-ui-name=&quot;List.Item&quot; role=&quot;listitem&quot; style=&quot;border: 0px; display: flex; font: inherit; margin: 0px; padding: 0px; vertical-align: initial;&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;___SMarker_3bu9y-red-team&quot; style=&quot;border: 0px; color: var(--intergalactic-text-secondary, #6c6e79); font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: var(--intergalactic-spacing-2x, 8px); margin-top: 0px; padding: 0px; vertical-align: initial;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;•&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class=&quot;___SContent_3bu9y-red-team&quot; style=&quot;border: 0px; font: inherit; margin: 0px; overflow: inherit; padding: 0px; text-overflow: inherit; vertical-align: initial;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Fiți la curent cu modul în care pozițiile de domeniu ale rivalilor dvs. se schimbă în rezultatele organice&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class=&quot;___SItem_3bu9y-red-team ___SText_nhabh-red-team&quot; data-ui-name=&quot;List.Item&quot; role=&quot;listitem&quot; style=&quot;border: 0px; display: flex; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: var(--intergalactic-spacing-2x, 8px); padding: 0px; vertical-align: initial;&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;___SMarker_3bu9y-red-team&quot; style=&quot;border: 0px; color: var(--intergalactic-text-secondary, #6c6e79); font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: var(--intergalactic-spacing-2x, 8px); margin-top: 0px; padding: 0px; vertical-align: initial;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;•&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class=&quot;___SContent_3bu9y-red-team&quot; style=&quot;border: 0px; font: inherit; margin: 0px; overflow: inherit; padding: 0px; text-overflow: inherit; vertical-align: initial;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Afla ce cuvinte cheie noi i-au ajutat pe competitorii tai sa intre in top 20 Google sau Bing&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class=&quot;___SItem_3bu9y-red-team ___SText_nhabh-red-team&quot; data-ui-name=&quot;List.Item&quot; role=&quot;listitem&quot; style=&quot;border: 0px; display: flex; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: var(--intergalactic-spacing-2x, 8px); padding: 0px; vertical-align: initial;&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;___SMarker_3bu9y-red-team&quot; style=&quot;border: 0px; color: var(--intergalactic-text-secondary, #6c6e79); font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: var(--intergalactic-spacing-2x, 8px); margin-top: 0px; padding: 0px; vertical-align: initial;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;•&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class=&quot;___SContent_3bu9y-red-team&quot; style=&quot;border: 0px; font: inherit; margin: 0px; overflow: inherit; padding: 0px; text-overflow: inherit; vertical-align: initial;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Înțelegeți unde câștigă propriile tactici și dacă există loc de îmbunătățire&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class=&quot;___SItem_3bu9y-red-team ___SText_nhabh-red-team&quot; data-ui-name=&quot;List.Item&quot; role=&quot;listitem&quot; style=&quot;border: 0px; display: flex; font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; line-height: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: var(--intergalactic-spacing-2x, 8px); padding: 0px; vertical-align: initial;&quot;&gt;&lt;div class=&quot;___SContent_3bu9y-red-team&quot; style=&quot;border: 0px; font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; line-height: inherit; margin: 0px; overflow: inherit; padding: 0px; text-overflow: inherit; vertical-align: initial;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;font-weight: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class=&quot;___SItem_3bu9y-red-team ___SText_nhabh-red-team&quot; data-ui-name=&quot;List.Item&quot; role=&quot;listitem&quot; style=&quot;border: 0px; display: flex; font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; line-height: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: var(--intergalactic-spacing-2x, 8px); padding: 0px; vertical-align: initial;&quot;&gt;&lt;div class=&quot;___SContent_3bu9y-red-team&quot; style=&quot;border: 0px; font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; line-height: inherit; margin: 0px; overflow: inherit; padding: 0px; text-overflow: inherit; vertical-align: initial;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;font-weight: inherit;&quot;&gt;Vezi Sursa Info&lt;/span&gt;&lt;a href=&quot;https://www.semrush.com/analytics/organic/overview?db=us&quot;&gt;&lt;b&gt; AICI&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p class=&quot;___SText_nhabh-red-team&quot; data-ui-name=&quot;Text&quot; style=&quot;border: 0px; font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: initial;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;a href=&quot;https://www.semrush.com/analytics/organic/overview?db=us&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;___SText_nhabh-red-team&quot; data-ui-name=&quot;Text&quot; style=&quot;border: 0px; font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: initial;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;a href=&quot;https://www.semrush.com/analytics/organic/overview?db=us&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;___SText_nhabh-red-team&quot; data-ui-name=&quot;Text&quot; style=&quot;border: 0px; font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: initial;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;a href=&quot;https://www.semrush.com/analytics/organic/overview?db=us&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://infotestpc.blogspot.com/feeds/8294546901967287211/comments/default' title='Postare comentarii'/><link rel='replies' type='text/html' href='http://infotestpc.blogspot.com/2012/10/optimizarea-paginii-web.html#comment-form' title='0 comentarii'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5038728009841547747/posts/default/8294546901967287211'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5038728009841547747/posts/default/8294546901967287211'/><link rel='alternate' type='text/html' href='http://infotestpc.blogspot.com/2012/10/optimizarea-paginii-web.html' title='SEO - OPTIMIZAREA    PAGINII  WEB'/><author><name>Al Con</name><uri>http://www.blogger.com/profile/17409243868650327707</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPNhfvX_O71ydyxXFIGCcIvGGP9_sd7tJMPl-CK36Xeyqf2VjSzprm22uYRcrOeyT_ggfjwP0koqx7Q6fYC3NGQ9NCOtaXiAeHFJ6hmJ6Utb24C_dNlAD5M6updkCIZjfqRui_eb3LqLYEOjobDPCMI35Hc98h8lalUWI7NXsIEMqYDYMckmlJse1n/s72-c/Trenul%20vie%C8%9Bii.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5038728009841547747.post-6504235970913843141</id><published>2012-10-06T13:50:00.001-07:00</published><updated>2020-12-16T12:14:41.779-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="BAZE DE DATE"/><category scheme="http://www.blogger.com/atom/ns#" term="Calculatorul"/><category scheme="http://www.blogger.com/atom/ns#" term="HARDWARE"/><category scheme="http://www.blogger.com/atom/ns#" term="Internet"/><category scheme="http://www.blogger.com/atom/ns#" term="MikroElektronika"/><category scheme="http://www.blogger.com/atom/ns#" term="Module"/><category scheme="http://www.blogger.com/atom/ns#" term="programare"/><category scheme="http://www.blogger.com/atom/ns#" term="Promo"/><category scheme="http://www.blogger.com/atom/ns#" term="Retele"/><category scheme="http://www.blogger.com/atom/ns#" term="Site"/><title type='text'>PROMOVARE  SITE</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikBdnimJ-xcHCp653cti4DEDM96FMuOvv4GNFmOC6C3PuICFjlOPtDH_WjKqONh8HYx9RmWx_XDciEFxwcZ23KX-44tumECOnvbhreguRsXP29PPtiLtiI54j6terxYnWEn6GIZkAK8A/s284/dow.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;177&quot; data-original-width=&quot;284&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikBdnimJ-xcHCp653cti4DEDM96FMuOvv4GNFmOC6C3PuICFjlOPtDH_WjKqONh8HYx9RmWx_XDciEFxwcZ23KX-44tumECOnvbhreguRsXP29PPtiLtiI54j6terxYnWEn6GIZkAK8A/s0/dow.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;PROMOVAREA  UNUI  SIT  WEB&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&amp;nbsp;&lt;/div&gt;
Orice webmaster vrea, fie că o recunoaşte deschis sau nu, ca situl său să fie vizitat de cît mai mulţi internauţi şi dacă se poate, cît mai des. Această dorinţă (care ţine de considerente financiare sau de ego) nu este însă realizabilă decît dacă webmasterul şi toţi ceilalţi implicaţi în administrarea sitului depun un efort constant pentru a menţine conţinutul şi aspectul sitului cît mai aproape de cerinţele internauţilor. Succesul unui sit, ca de altfel al oricărui produs, se datorează în mare măsură şi modului în care este promovat, cu alte cuvinte marketingul este aproape la fel de important ca şi calitatea unui produs.&lt;span style=&quot;color: blue;&quot;&gt;&lt;b&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;font-size: 24pt;&quot;&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;/span&gt;
  &lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;
  &lt;/span&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;În
  această lume a internetului încă foarte tînără,
  experţii în crearea de situri Web sau redactorii de articole interesante
  nu sînt de obicei şi experţi în marketing. Tocmai din această
  cauză promovarea eficientă a unui sit web este făcută de
  cele mai multe ori de către profesionişti. Aceştia îşi
  oferă serviciile contra cost şi la ei apelează companiile care
  vor să-şi construiască o prezentă importan&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;t&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;ă pe &lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;internet&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;. Sumele investite în marketingul
  profesional sînt impresionante şi în permanentă creştere de la
  an la an.&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;ol style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 16px; margin-bottom: 0px; margin-top: 0px; text-align: justify;&quot;&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: #050505; font-family: Arial; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;https://mateisoscel.blogspot.com/2020/12/ce-sa-mai-citim.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 18pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Ce să mai citim?&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;a href=&quot;https://mateisoscel.blogspot.com/2020/12/ce-sa-mai-citim.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Ce să mai citim?&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;a href=&quot;https://anunturigratuitenet.blogspot.com/2012/09/specialisti-in-domeniul-it.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Tatăl fondator al Uniunii Europene.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;a href=&quot;https://alecscon.blogspot.com/2013/01/colonizarea-de-pe-marte.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Colonizarea de pe Marte !&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #050505; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;https://alecscon.blogspot.com/2012/08/robot-pe-marte.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Ne pregătim pentru Marte&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;a href=&quot;https://alecscon.blogspot.com/2012/08/robot-pe-marte.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Colonizarea Marte poate determina umanitatea să-și modifice ADN-ul ?&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: #050505; font-family: Arial; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;a href=&quot;https://blogulucovid.blogspot.com/2020/12/cine-mai-uraste-sa-poarte-o-masca.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;Cine mai urăște să poarte mască?&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #050505; font-family: Arial;&quot;&gt;&lt;span style=&quot;font-size: 16px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;
  &lt;/span&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;O
  caracteristică a Internetului este că acesta, în calitatea sa de
  spaţiu virtual permite oricărui internaut să-şi
  construiască un sit &lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;w&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;eb, existînd, spre deosebire de spaţiul real,
  destul loc pentru toată lumea. Mai mult, internautul respectiv nu
  trebuie să aibă cunoştinţe avansate de limbaj HTML sau
  să plătească vreun ban pentru locul de pe Internet unde vrea
  să-şi construiască situl (se exclud bineînţeles
  cheltuielile legate de conectare şi cele datorate operatorului de
  telefonie). Există în momentul de fa&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;ţ&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;ă poate zeci de milioane de
  situri în toată lumea, cele mai multe dintre ele aparţinînd unor
  internauţi obişnuiţi şi nu unor companii sau
  instituţii.&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Siturile mici sînt însă
  potenţiale surse de cîştig material pentru proprietari, pentru
  că există companii interesate să cumpere spaţiu
  publicitar chiar şi pe siturile mici, cu condiţia ca acestea
  să fie vizitate des. Un sit bine făcut şi care şi-a
  dobîndit deja o &quot;clientelă&quot; de internauţi constantă
  poate fi la un moment dat cumpărat pentru o sumă importantă de
  către o companie mult mai mare, existînd în plus posibilitatea ca
  administratorii sitului să-şi păstreze locurile de muncă
  pentru a continua să menţină şi să
  îmbunătăţească situl.&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Ţinînd cont de faptul
  că internauţii romani care sînt în acelaşi timp şi
  webmasteri vor să le fie vizitate siturile, ei trebuie să
  înveţe să-şi facă singuri activitatea de marketing,
  pentru că nu au mijloacele financiare necesare pentru apelarea la
  specialişti. Multe firme rumîneşti care vor să aibă
  situri web de succes sînt în aceeaşi situaţie, din cauza
  dificultăţilor financiare neputînd fi luată în discuţie
  cumpărarea de spaţiu publicitar pe &lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;i&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;nternet sau angajarea unor
  specialişti în marketing. Greul promovării sitului cade astfel pe
  umerii webmasterului, transformat peste noapte şi în responsabil cu
  marketingul.&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;În cele ce urmează vor fi
  prezentate metodele prin care orice internaut poate să-şi promoveze
  situl&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;,&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;
  fără a fi nevoit să apeleze la profesionişti. &lt;/span&gt;&lt;/div&gt;
&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Metodele
  cele mai eficiente de promovare a unui sit sînt următoarele:&lt;/span&gt;&lt;br /&gt;
&lt;ul type=&quot;disc&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;color: black; mso-list: l1 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt;&quot;&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1)
       Optimizarea sitului web pentru indexarea adecvată de către
       motoarele de căutare&lt;/span&gt;&lt;span style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;color: black; mso-list: l1 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt;&quot;&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;2)
       Înscrierea sitului în cataloagele de adrese ale portalurilor
       internaţionale şi rumîneşti&lt;/span&gt;&lt;span style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;color: black; mso-list: l1 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt;&quot;&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;3)
       Promovarea sitului pe forumurile on-line sau în grupurile de
       discuţii &lt;/span&gt;&lt;span style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;color: black; mso-list: l1 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt;&quot;&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;4)
       Participarea la clasamentele siturilor care fac topuri&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Să presupunem că dorim să construim un sit pentru firma pe care o deţinem. Aceasta pune în vînzare biciclete (noi şi la mîna a doua) şi piese de schimb, dar în acelaşi timp oferă şi servicii de reparare a unor biciclete care au fost vîndute sau nu de firmă. Dorim să alcătuim un sit care să fie mixt, adică să aibă o parte comercială şi una de informare.    &lt;span style=&quot;color: blue;&quot;&gt;&lt;b&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;font-size: 24pt;&quot;&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;/span&gt;
  &lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Primul pas este să alegem un
  domeniu pentru situl firmei. Este indicat să cumpărăm un
  domeniu cu nume sugestiv, de exemplu putem folosi cuvîntul
  &quot;biciclete&quot; şi să alegem unul din domeniile&amp;nbsp;
  http://www.biciclete.ro sau http://www.biciclete.com. Dacă acestea au
  fost deja cumpărate&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;,&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt; putem alege un domeniu care se termină în NET
  (http://www.biciclete.net), BIZ, etc. În cazul puţin probabil în care
  toate domeniile au fost deja cumpărate&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;,&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt; putem încerca diverse variante
  de cuvinte compuse, de exemplu &quot;super-biciclete&quot;. Numele unui
  domeniu nu trebuie să conţină spaţii&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;,&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt; de aceea dacă vom folosi un
  cuvînt compus &lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;va &lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;trebui să folosim o liniuţă pentru a
  lega părţile sale componente. Al doilea pas care trebuie făcut
  este să găzduim situl pe un server.&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;
  &lt;/span&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Pentru
  ambele iniţiative expuse mai sus (înregistrare&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;a&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt; domeniu&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;lui&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt; şi găzduire&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;a&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt; sit&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;ului&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;)&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;,&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt; cel mai indicat este să
  apelăm la serviciile unei companii specializate. În general furnizorii
  de servicii internet (cei care oferă acces la internet) propun şi
  servicii de înregistrare şi găzduire de situri. Dacă dorim
  să comparăm ofertele mai multor companii&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;,&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt; putem să căutăm
  pe internet pagini care conţin sintagmele: &quot;înregistrare domenii
  web&quot; şi &quot;găzduire situri web&quot; sau să
  vizităm secţiunile de legături ale portalurilor rumîneşti
  sau ale &lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;catalogului &lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;ODP. De asemenea putem să căutăm sintagmele &quot;web
  domain registration rumania&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&quot; şi &quot;web hosting rumania&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&quot;.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;În cazul în care nu dorim să
  investim mulţi bani în situl web&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;,&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt; dar dorim să avem o prezen&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;ţ&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;ă pe internet&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;,&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt; &lt;span lang=&quot;X-NONE&quot;&gt;putem să apelăm la
  variantele gratuite de înregistrare a unui domeniu web şi de
  găzduire de situri. O&amp;nbsp; astfel de variantă este
  recomandată într-o primă instanţă, pentru a nu &lt;/span&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;i&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;nve&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;s&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;ti mulţi bani în ceva
  (prezen&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; style=&quot;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;ţ&lt;/span&gt;&lt;span face=&quot;&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot; lang=&quot;X-NONE&quot; style=&quot;mso-ansi-language: X-NONE; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;ă pe
  internet) de care nu sîntem siguri că ne va aduce un profit pe
  măsura sumelor investite. Totul se rezumă la a ne înregistra la
  unul din numeroasele situri care propun astfel de servicii.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://infotestpc.blogspot.com/feeds/6504235970913843141/comments/default' title='Postare comentarii'/><link rel='replies' type='text/html' href='http://infotestpc.blogspot.com/2012/10/promovare-site.html#comment-form' title='0 comentarii'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5038728009841547747/posts/default/6504235970913843141'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5038728009841547747/posts/default/6504235970913843141'/><link rel='alternate' type='text/html' href='http://infotestpc.blogspot.com/2012/10/promovare-site.html' title='PROMOVARE  SITE'/><author><name>Al Con</name><uri>http://www.blogger.com/profile/17409243868650327707</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikBdnimJ-xcHCp653cti4DEDM96FMuOvv4GNFmOC6C3PuICFjlOPtDH_WjKqONh8HYx9RmWx_XDciEFxwcZ23KX-44tumECOnvbhreguRsXP29PPtiLtiI54j6terxYnWEn6GIZkAK8A/s72-c/dow.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5038728009841547747.post-5088758812375171339</id><published>2012-10-06T13:18:00.002-07:00</published><updated>2020-12-16T12:15:18.423-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="BAZE DE DATE"/><category scheme="http://www.blogger.com/atom/ns#" term="Calculatorul"/><category scheme="http://www.blogger.com/atom/ns#" term="HTML"/><category scheme="http://www.blogger.com/atom/ns#" term="Initiere"/><category scheme="http://www.blogger.com/atom/ns#" term="Internet"/><category scheme="http://www.blogger.com/atom/ns#" term="Module"/><category scheme="http://www.blogger.com/atom/ns#" term="procesorul"/><category scheme="http://www.blogger.com/atom/ns#" term="programare"/><category scheme="http://www.blogger.com/atom/ns#" term="Server"/><title type='text'>Serverul - un sistem de gazduire</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h3 style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;Ce inseamna server&lt;/span&gt;&lt;/h3&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://htmlimg2.scribdassets.com/5oi73zr35scq3av/images/3-7ae3639d0f.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;141&quot; src=&quot;http://htmlimg2.scribdassets.com/5oi73zr35scq3av/images/3-7ae3639d0f.jpg&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;text-block&quot;&gt;
Toata lumea stie, probabil, ce inseamna Internet: acea colectie uriasa 
de echipamente legate intre ele in scopul schimbului de informatii sau 
al furnizarii de servicii. Daca ar fi sa simplificam mult ideea de 
internet, am putea considera ca acesta este o retea de calculatoare in 
care fiecare nod (calculator) gazduieste informatii sau servicii ce pot 
fi accesate de publicul larg. Aceste calculatoare din internet poarta 
numele de &lt;strong&gt;servere&lt;/strong&gt;.&lt;/div&gt;
&lt;div class=&quot;text-block&quot;&gt;
In sens larg, un &lt;strong&gt;server&lt;/strong&gt; este un dispozitiv (combinatie de hardware si software) care ofera servicii si/sau informatii utilizatorilor (clientilor). &lt;/div&gt;
&lt;div class=&quot;text-block&quot;&gt;
Odata cu notiunea de server apare si cea de &lt;strong&gt;arhitectura client-server&lt;/strong&gt;,
 care se refera la un ansamblu format dintr-un dispozitiv server 
(furnizor de informatii) si un dispozitiv (calculator) client, conectate
 prin intermediul unei retele si care fac schimb de informatii.
Cel mai comun exemplu al acestui ansamblu este dat de functionalitatea 
de partajare a fisierelor in retea (File Sharing). Spre exemplu, un 
calculator contine un folder partajat (share-uit) si un alt calculator 
copiaza folderul prin retea. In aceasta situatie, calculatorul care 
ofera folderul are functia de server iar cel care preia folderul - pe 
cea de client. Rolul de client/server nu este statornic in acest 
scenariu, oricare din cele doua calculatoare putand oricand sa detine 
oricare din functii. Asadar notiunea de &lt;strong&gt;server&lt;/strong&gt; se aplica in momentul in care dispozitivul din retea (calculatorul) ofera informatii sau servicii.
&lt;/div&gt;&lt;div class=&quot;text-block&quot;&gt;&lt;br /&gt;&lt;/div&gt;
&lt;ol style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, Arial, sans-serif; font-size: 16px; margin-bottom: 0px; margin-top: 0px; text-align: justify;&quot;&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: #050505; font-family: Arial; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;https://mateisoscel.blogspot.com/2020/12/ce-sa-mai-citim.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 18pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Ce să mai citim?&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;a href=&quot;https://mateisoscel.blogspot.com/2020/12/ce-sa-mai-citim.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Ce să mai citim?&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;a href=&quot;https://anunturigratuitenet.blogspot.com/2012/09/specialisti-in-domeniul-it.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Tatăl fondator al Uniunii Europene.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;a href=&quot;https://alecscon.blogspot.com/2013/01/colonizarea-de-pe-marte.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Colonizarea de pe Marte !&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #050505; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;https://alecscon.blogspot.com/2012/08/robot-pe-marte.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Ne pregătim pentru Marte&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;a href=&quot;https://alecscon.blogspot.com/2012/08/robot-pe-marte.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Colonizarea Marte poate determina umanitatea să-și modifice ADN-ul ?&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: #050505; font-family: Arial; font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;p dir=&quot;ltr&quot; role=&quot;presentation&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: #f0f2f5; color: #1155cc; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;a href=&quot;https://blogulucovid.blogspot.com/2020/12/cine-mai-uraste-sa-poarte-o-masca.html&quot; style=&quot;text-decoration-line: none;&quot;&gt;Cine mai urăște să poarte mască?&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;
&lt;h3&gt;
Server web&lt;/h3&gt;
&lt;div class=&quot;text-block&quot;&gt;
Un tip particular de server, este &lt;strong&gt;server-ul web&lt;/strong&gt;. 
Un server web este un sistem care gazduieste si ofera pagini web prin intermediul unei retele. 
De cele mai multe ori, termenul de &lt;tt&gt;server web&lt;/tt&gt; desemneaza a 
aplicatie, un program care ruleaza pe calculatorul-server si care este 
responsabil cu primirea cerintelor de la utilizatori si transferarea 
paginilor web catre ei.&lt;/div&gt;
&lt;br /&gt;
&lt;h3&gt;
Ce inseamna site?&lt;/h3&gt;
&lt;div class=&quot;text-block&quot;&gt;
Paginile stocate pe un calculator-server si oferite publicului larg sunt grupate sub denumirea generica de &lt;strong&gt;site&lt;/strong&gt;. Un site (denumit si &lt;strong&gt;website&lt;/strong&gt;) este, asadar, o colectie de pagini web, interconectate, stocate pe un server web.
&lt;/div&gt;
&lt;br /&gt;
&lt;h3&gt;
Deservirea paginilor&lt;/h3&gt;
&lt;div class=&quot;text-block&quot;&gt;
In momentul in care un server web primeste o cerinta de la un utilizator
 pentru o pagina, se verifica mai intai existenta acesteia. Daca pagina 
exista fizic pe server atunci este transmisa catre utilizator. Paginile 
returnate de un server web sunt de obicei in format HTML. Navigatoarele 
web (browserele) sunt capabile sa interpreteze codul HTML si sa afiseze 
informatiile intr-un mod usor de citit. 
&lt;/div&gt;
&lt;div class=&quot;text-block&quot;&gt;
In imaginea de mai jos este reprezentata o comunicare tipica intre un server web si un client.
&lt;/div&gt;
&lt;div style=&quot;margin-left: 20%;&quot;&gt;
&lt;img alt=&quot;deservirea paginilor statice&quot; height=&quot;319&quot; src=&quot;http://php.punctsivirgula.ro/public/resurse/install_cl-sr.jpg&quot; width=&quot;160&quot; /&gt; &lt;br /&gt;
&lt;small&gt;Deservirea unei pagini statice, fara interventia interpretorului &lt;br /&gt;PHP&lt;/small&gt;
&lt;/div&gt;
&lt;div class=&quot;text-block&quot;&gt;
In lumea reala, paginile deservite de un server web sunt de cele mai multe ori &lt;strong&gt;modificate&lt;/strong&gt;
 inainte de a fi transmise catre clienti. Exista situatii cand paginile 
cerute nici nu exista fizic pe calculatorul server si cu toate astea ele
 sunt construite si deservite la cerere. &lt;/div&gt;
&lt;div class=&quot;text-block&quot;&gt;
Acest lucru este posibil gratie unor module sau aplicatii aditionale 
care functioneaza impreuna cu aplicatia de server web. Unul din aceste 
module este &lt;strong&gt;PHP&lt;/strong&gt;.
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://infotestpc.blogspot.com/feeds/5088758812375171339/comments/default' title='Postare comentarii'/><link rel='replies' type='text/html' href='http://infotestpc.blogspot.com/2012/10/serveril-un-sistem-de-gazduire.html#comment-form' title='0 comentarii'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5038728009841547747/posts/default/5088758812375171339'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5038728009841547747/posts/default/5088758812375171339'/><link rel='alternate' type='text/html' href='http://infotestpc.blogspot.com/2012/10/serveril-un-sistem-de-gazduire.html' title='Serverul - un sistem de gazduire'/><author><name>Al Con</name><uri>http://www.blogger.com/profile/17409243868650327707</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>