<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: mahdin1209</title>
    <description>The latest articles on DEV Community by mahdin1209 (@mahdin1209).</description>
    <link>https://dev.to/mahdin1209</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F982869%2Fdbb11757-d4ca-4055-b51c-3a5b26ef9aa3.png</url>
      <title>DEV Community: mahdin1209</title>
      <link>https://dev.to/mahdin1209</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mahdin1209"/>
    <language>en</language>
    <item>
      <title>INTRODUCTION TO PYTHON (For and while loops and STRINGS)</title>
      <dc:creator>mahdin1209</dc:creator>
      <pubDate>Fri, 02 Dec 2022 12:54:30 +0000</pubDate>
      <link>https://dev.to/mahdin1209/introduction-to-python-for-and-while-loops-and-strings-16f2</link>
      <guid>https://dev.to/mahdin1209/introduction-to-python-for-and-while-loops-and-strings-16f2</guid>
      <description>&lt;h2&gt;
  
  
  While loops:
&lt;/h2&gt;

&lt;p&gt;With the while loop we can execute a set of statements as long as a condition is true.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--XF_kafh9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pg2ra2vssacywtynbxy7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XF_kafh9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pg2ra2vssacywtynbxy7.png" alt="Image description" width="540" height="346"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;break statement:&lt;/strong&gt;&lt;br&gt;
It is a loop control statement. Suppose you want to terminate a loop and skip to the next code after the loop; break will help you do that. It is used after the loop statements.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--bR_e1Ill--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fikulwq3yehkypcf60xt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bR_e1Ill--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fikulwq3yehkypcf60xt.png" alt="Image description" width="515" height="265"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;continue statement&lt;/strong&gt;&lt;br&gt;
With the continue statement we can stop the current iteration, and continue with the next.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gu5L6YzJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4odso6wrmqmgnk0hjwjf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gu5L6YzJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4odso6wrmqmgnk0hjwjf.png" alt="Image description" width="584" height="383"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  for loops:
&lt;/h2&gt;

&lt;p&gt;A for loop is used for iterating over a sequence (that is either a list, a tuple, a dictionary, a set, or a string).&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Wk0Hqo41--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9ph6czi7vwns16hbv2n2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Wk0Hqo41--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9ph6czi7vwns16hbv2n2.png" alt="Image description" width="615" height="323"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Range() function&lt;/strong&gt;&lt;br&gt;
The range() function returns a sequence of numbers, starting from 0 by default, and increments by 1 (by default), and stops before a specified number.&lt;br&gt;
range(start,stop,step)&lt;br&gt;
start: Optional. An integer number specifying at which position to start. Default is 0&lt;br&gt;
stop: Required. An integer number specifying at which position to stop (not included).&lt;br&gt;
step: Optional. An integer number specifying the incrementation. Default is 1.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--SJWDLhF5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mw6j7bsmsuyqri2m0g33.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SJWDLhF5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mw6j7bsmsuyqri2m0g33.png" alt="Image description" width="750" height="443"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  STRINGS
&lt;/h2&gt;

&lt;p&gt;A string (str) in Python is a single character or a collection of characters. Strings in python usually represented by double or single quotation.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Ob90fSem--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2plhpfy3nxlabwuu5zjc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Ob90fSem--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2plhpfy3nxlabwuu5zjc.png" alt="Image description" width="457" height="160"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If we want to print multiple lines of strings, we just have to follow these steps:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Vme3aibf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hr4drxp0ccvas3i4qs5g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Vme3aibf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hr4drxp0ccvas3i4qs5g.png" alt="Image description" width="880" height="332"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;len() function&lt;/strong&gt;&lt;br&gt;
The len() function returns the length of a string:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jkMXP5hY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c5v4z4r55ps32djamun9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jkMXP5hY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c5v4z4r55ps32djamun9.png" alt="Image description" width="499" height="160"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Indexing&lt;/strong&gt;&lt;br&gt;
We can access every element in strings by indexing. There are two types of indexing one is positive indexing and another one is negative indexing.&lt;br&gt;
Positive indexing:&lt;br&gt;
Positive indexing starts from 0 and ends at (length of a string -1).&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wEyUrMjF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/islvwnn3f8r0d8otda02.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wEyUrMjF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/islvwnn3f8r0d8otda02.png" alt="Image description" width="880" height="41"&gt;&lt;/a&gt;&lt;br&gt;
Negative indexing:&lt;br&gt;
Negative indexing starts from -1 and -length of string.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hJ1dbFfc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zqm2xzwpaossjbe2hxf3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hJ1dbFfc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zqm2xzwpaossjbe2hxf3.png" alt="Image description" width="880" height="42"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--n8_NnRdC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/phu546ttjmpgms3h8z77.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--n8_NnRdC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/phu546ttjmpgms3h8z77.png" alt="Image description" width="512" height="288"&gt;&lt;/a&gt;&lt;br&gt;
_Strings are immutable. Once a string is created the characters on it can't be changed or deleted. _&lt;/p&gt;

</description>
    </item>
    <item>
      <title>INTRODUCTION PART 2</title>
      <dc:creator>mahdin1209</dc:creator>
      <pubDate>Fri, 02 Dec 2022 11:12:09 +0000</pubDate>
      <link>https://dev.to/mahdin1209/introduction-part-2-24bm</link>
      <guid>https://dev.to/mahdin1209/introduction-part-2-24bm</guid>
      <description>&lt;p&gt;Today we are going to learn about some basics of python like indentation and branching.&lt;/p&gt;

&lt;h2&gt;
  
  
  Indentation
&lt;/h2&gt;

&lt;p&gt;So, first of all indentation refers to the spaces at the beginning of a code line. It mainly indicates a block of code. A code block (body of a condition, loop, function etc) starts with indentation and ends with the first unintended line. In python indentation is very important as it will give you an error if you skip the indentation.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--dpuazSGD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w9t8fczpqe7pdjabf3cz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dpuazSGD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w9t8fczpqe7pdjabf3cz.png" alt="Image description" width="663" height="224"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jwl1ysiT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/osq4wcnyb8iaxx8on3j7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jwl1ysiT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/osq4wcnyb8iaxx8on3j7.png" alt="Image description" width="791" height="367"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Branching
&lt;/h2&gt;

&lt;p&gt;Python programming language provides following types of decision making or branching statements in Python. Python programming language provided decision making statements or branching statements as follows.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;if statements&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;if...else statements&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;if....elif....else statements&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;nested if statements&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;if statements&lt;/strong&gt;&lt;br&gt;
It is used to decide whether a certain statement or block of statements will be executed or not. If a certain condition is true, then a block of statement is executed otherwise not.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--glR86uY4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0ibcn6t34b4o8e7ub0sk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--glR86uY4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0ibcn6t34b4o8e7ub0sk.png" alt="Image description" width="537" height="196"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;if...else statements&lt;/strong&gt;&lt;br&gt;
The else statement is always used with if statement. It is used to execute block of codes whenever if condition gives false result.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--t46L6my3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0x0o3huev824caahona4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--t46L6my3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0x0o3huev824caahona4.png" alt="Image description" width="669" height="271"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;if...elif...else statements&lt;/strong&gt;&lt;br&gt;
For adding more conditions, elif statement in used. The program first checks if condition. When found false, it checks elif conditions. If all elif conditions are found false, then else code block is executed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3spJe5kU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qy11jry58712qwqqsslb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3spJe5kU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qy11jry58712qwqqsslb.png" alt="Image description" width="626" height="363"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;nested if statements&lt;/strong&gt;&lt;br&gt;
A nested if statement is an if statement placed inside another if statement. In a nested if construct, you can have an if...elif...else construct inside another if...elif...else construct.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--yiyQza0K--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zzfskn9nf3dp8w6ndyd9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--yiyQza0K--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zzfskn9nf3dp8w6ndyd9.png" alt="Image description" width="581" height="366"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  print() function example
&lt;/h2&gt;

&lt;p&gt;There are some functions which are probably used in print().&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;sep="seperator"
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GJd_jfDC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b4d7vsxhs2if94zk7swl.png" alt="Image description" width="457" height="196"&gt;
&lt;/li&gt;
&lt;li&gt;end="end"
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2-Ve41Us--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1v1fwobyanjqqf0cuvzc.png" alt="Image description" width="493" height="235"&gt;
&lt;/li&gt;
&lt;/ol&gt;

</description>
    </item>
    <item>
      <title>INTRODUCTION</title>
      <dc:creator>mahdin1209</dc:creator>
      <pubDate>Fri, 02 Dec 2022 05:44:29 +0000</pubDate>
      <link>https://dev.to/mahdin1209/introduction-iml</link>
      <guid>https://dev.to/mahdin1209/introduction-iml</guid>
      <description>&lt;p&gt;&lt;a href="https://dev.to/amahdin2/python-for-beginners-part-1-2n0j"&gt;https://dev.to/amahdin2/python-for-beginners-part-1-2n0j&lt;/a&gt;&lt;/p&gt;

</description>
      <category>rust</category>
      <category>webdev</category>
      <category>backend</category>
    </item>
  </channel>
</rss>
