<?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: Gaurav</title>
    <description>The latest articles on DEV Community by Gaurav (@gauravsaha97).</description>
    <link>https://dev.to/gauravsaha97</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F315080%2F6567f38e-21fc-415f-b59f-f1254705a432.jpg</url>
      <title>DEV Community: Gaurav</title>
      <link>https://dev.to/gauravsaha97</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/gauravsaha97"/>
    <language>en</language>
    <item>
      <title>Python [ 'L', 'I', 'S', 'T' ] </title>
      <dc:creator>Gaurav</dc:creator>
      <pubDate>Mon, 31 Aug 2020 10:22:40 +0000</pubDate>
      <link>https://dev.to/gauravsaha97/python-l-i-s-t-44ec</link>
      <guid>https://dev.to/gauravsaha97/python-l-i-s-t-44ec</guid>
      <description>&lt;p&gt;Whether you are a Python beginner😵 or a proficient Python Programmer/Developer🤩, one of the most common Data Structure that you will encounter is &lt;strong&gt;List&lt;/strong&gt;📃&lt;/p&gt;



&lt;ul&gt;
&lt;li&gt;List, in Python, is an &lt;em&gt;ordered, mutable, heterogeneous, dynamic&lt;/em&gt; Datatype. &lt;/li&gt;
&lt;li&gt;They are &lt;em&gt;ordered&lt;/em&gt;, so we can access individual elements through index.&lt;/li&gt;
&lt;li&gt;They are &lt;em&gt;mutable&lt;/em&gt;, means that the list elements can be updated.
&lt;/li&gt;
&lt;li&gt;A List can contain data of various datatypes like &lt;em&gt;Integer, Float, Boolean, String&lt;/em&gt; etc. &lt;/li&gt;
&lt;li&gt;List can contain &lt;em&gt;duplicate&lt;/em&gt; elements.&lt;/li&gt;
&lt;li&gt;Example of a list is 

&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;new_list = ["John", 2 , 2.5, True]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;





&lt;p&gt;Simple✨💥......isn't it??!!!!!!😎🤩&lt;/p&gt;

&lt;p&gt;
Okay..Let's discuss some of the most common methods that we can use upon Lists.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;append()&lt;/strong&gt;
&lt;p&gt;&lt;em&gt;This method is used to add/append elements at the end of the list.&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Syntax&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;list.append(element)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;num_list = ["John", 1, 2, 3, 4, True]
num_list.append(5)
print("Updated List: {}".format(num_list))
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Updated List: ['John', 1, 2, 3, 4, True, 5]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;





&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;insert()&lt;/strong&gt;
&lt;p&gt;&lt;em&gt;This method is used to insert/add element at a specified location/index.&lt;/em&gt; &lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Syntax&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;list.insert(index, element)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;num_list = ["John", 1, 2, 3, 4, True]
num_list.insert(1,500)
print("Updated List: {}".format(num_list)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Updated List: ["John", 500, 1, 2, 3, 4, True]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;500 is inserted at index 1. &lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;count()&lt;/strong&gt;
&lt;p&gt;&lt;em&gt;This method returns the number of occurrence of a particular element in a list.&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Syntax&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;list.count(element)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;num_list = [1,2,3,5,4,5,6,5]
cnt = num_list.count(5)
print("Number of times 5 occur: {}".format(cnt))
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Number of times 5 occur: 3
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;sort()&lt;/strong&gt;
&lt;p&gt;&lt;em&gt;This method sorts the list in ascending order by default. To sort in descending order, we have to use &lt;b&gt;reverse&lt;/b&gt; flag within the &lt;b&gt;sort&lt;/b&gt; method.&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Syntax&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;list.sort(reverse = True|False, key = function_name)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;num_list = [1,2,3,5,4,5,6,5]
num_list.sort()
print("Sorted List in Ascending Order: {}".format(num_list))
num_list.sort(reverse = True)
print("Sorted List in Descending Order: {}".format(num_list))
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Sorted List in Ascending Order: [1, 2, 3, 4, 5, 5, 5, 6]                                                                      
Sorted List in Descending Order: [6, 5, 5, 5, 4, 3, 2, 1]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;reverse()&lt;/strong&gt;
&lt;p&gt;&lt;em&gt;As the name implies, this method reverses a list.&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Syntax&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;list.reverse()
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;num_list = [1,2,3,5,4,5,6,5]
num_list.reverse()
print("Reversed List: {}".format(num_list))
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Reversed List: [5, 6, 5, 4, 5, 3, 2, 1]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;remove()&lt;/strong&gt;
&lt;p&gt;&lt;em&gt;This method removes a specified element from the list. If the specified element occurs more than once, then the first occurrence of the element is removed.&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Syntax&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;list.remove(element)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;num_list = [1,2,3,5,4,5,6,5]
print("List before updating: {}".format(num_list))
num_list.remove(5)
print("Updated List: {}".format(num_list))
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;List before updating: [1, 2, 3, 5, 4, 5, 6, 5]                                                                                
Updated List: [1, 2, 3, 4, 5, 6, 5]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;pop()&lt;/strong&gt;
&lt;p&gt;&lt;em&gt;This method removes the element from the specified location/index.&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Syntax&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;list.pop(index)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;num_list = [1,2,3,5,4,5,6,5]
print("List before updating: {}".format(num_list))
num_list.pop(5)
print("Updated List: {}".format(num_list))
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;List before updating: [1, 2, 3, 5, 4, 5, 6, 5]                                                                                
Updated List: [1, 2, 3, 5, 4, 6, 5]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;index()&lt;/strong&gt;
&lt;p&gt;&lt;em&gt;This method returns the index of a specified element. If the specified element occurs more than once, then index of the first occurrence of the element is returned.&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Syntax&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;list.index(element)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;num_list = [1,2,3,5,4,5,6,5]
idx = num_list.index(5)
print("Index of 5: {}".format(idx))
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Index of 5: 3
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;extend()&lt;/strong&gt;
&lt;p&gt;&lt;em&gt;This method appends/adds the elements of any iterable (List, Set, Tuple, etc.) to the end of the current list.&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Syntax&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;list.extend(iterable)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;num_list = [100,200,300,400,500]
char_list = ["A", "B", "C", "D"]
num_list.extend(char_list)
print("Updated List: {}".format(num_list))
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Updated List: [100, 200, 300, 400, 500, 'A', 'B', 'C', 'D']
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;copy()&lt;/strong&gt;
&lt;p&gt;&lt;em&gt;This method creates a copy of the specified list.&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Syntax&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;list_2 = list_1.copy()
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;em&gt;list_2&lt;/em&gt; is the copy of &lt;em&gt;list_1&lt;/em&gt;&lt;br&gt;
&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Example&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;num_list = [100,200,300,400,500]
new_list = num_list.copy()
print("Copy of the 'num_list': {}".format(new_list))
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Copy of the 'num_list': [100, 200, 300, 400, 500]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;clear()&lt;/strong&gt;
&lt;p&gt;&lt;em&gt;This method removes all the elements from the specified list.&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Syntax&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;list.clear()
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;num_list = [100,200,300,400,500]
num_list.clear()
print("Cleared List: {}".format(num_list))
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Cleared List: []
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;So...working with a List isn't that difficult!!....right???!!!!😇&lt;br&gt;
&lt;br&gt;&lt;br&gt;
Happy Learning!!✌😎&lt;/p&gt;

</description>
      <category>python</category>
      <category>list</category>
      <category>datastructure</category>
      <category>programming</category>
    </item>
    <item>
      <title>CSS FLEXBOX - A STARTER KIT</title>
      <dc:creator>Gaurav</dc:creator>
      <pubDate>Sun, 30 Aug 2020 07:56:06 +0000</pubDate>
      <link>https://dev.to/gauravsaha97/css-flexbox-a-starter-kit-4dca</link>
      <guid>https://dev.to/gauravsaha97/css-flexbox-a-starter-kit-4dca</guid>
      <description>&lt;p&gt;Hey Learner, do you want to learn &lt;em&gt;Frontend Development&lt;/em&gt;???🤩🤩&lt;br&gt;
YYYYYYYEEEEEEESSSSSSSSS???!!!!💯 &lt;br&gt;
Then &lt;strong&gt;CSS&lt;/strong&gt; is one of the tools in which developers like you spend a lot of time to learn and implement 🤕🤒&lt;/p&gt;

&lt;p&gt;So, to get started with Flexbox, first thing you need to know is &lt;strong&gt;What is a Flexbox?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Well, &lt;em&gt;CSS Flexbox&lt;/em&gt; is a &lt;strong&gt;one-dimensional model or structure&lt;/strong&gt; that not only helps you to arrange your items or elements along the &lt;em&gt;cross-axis (top-bottom)&lt;/em&gt; and &lt;em&gt;main-axis (left-right)&lt;/em&gt; but also provides you a lot of flexibility to control the &lt;strong&gt;spacing&lt;/strong&gt; between the elements😲😲&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Thma86e2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/e9yfhao76zm4wmufgcx1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Thma86e2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/e9yfhao76zm4wmufgcx1.png" alt="Flexbox"&gt;&lt;/a&gt;&lt;br&gt;
Hope, this image gives you a basic idea about the different components of a Flexbox. &lt;br&gt;
We have a parent &lt;strong&gt;Flex Container&lt;/strong&gt;, within which all our children &lt;strong&gt;Flex-items&lt;/strong&gt; are arranged.&lt;/p&gt;
&lt;h4&gt;
  
  
  The properties of a CSS Flexbox Container are:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;display&lt;/li&gt;
&lt;li&gt;flex-direction&lt;/li&gt;
&lt;li&gt;flex-flow&lt;/li&gt;
&lt;li&gt;flex-wrap&lt;/li&gt;
&lt;li&gt;justify-content&lt;/li&gt;
&lt;li&gt;align-items&lt;/li&gt;
&lt;li&gt;align-content&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Display
&lt;/h3&gt;

&lt;p&gt;Display Property is used to create a &lt;em&gt;Flex Container&lt;/em&gt;. The value of the &lt;em&gt;display&lt;/em&gt; property is either set to &lt;strong&gt;flex&lt;/strong&gt; or &lt;strong&gt;inline-flex&lt;/strong&gt;. The following code snippet will create a &lt;em&gt;Flex-container&lt;/em&gt; with six &lt;em&gt;Flex-items&lt;/em&gt; embedded within it.&lt;/p&gt;
&lt;h4&gt;
  
  
  index.html
&lt;/h4&gt;


&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html lang="en"&amp;gt;

&amp;lt;head&amp;gt;
    &amp;lt;meta charset="UTF-8"&amp;gt;
    &amp;lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&amp;gt;
    &amp;lt;&amp;lt;link rel="stylesheet" href="style.css"&amp;gt;
        &amp;lt;title&amp;gt;CSS Flexbox&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;

&amp;lt;body&amp;gt;
    &amp;lt;div class="container"&amp;gt;
        &amp;lt;div class="flex-items fruit-1"&amp;gt;Apple&amp;lt;/div&amp;gt;
        &amp;lt;div class="flex-items fruit-2"&amp;gt;Orange&amp;lt;/div&amp;gt;
        &amp;lt;div class="flex-items fruit-3"&amp;gt;Banana&amp;lt;/div&amp;gt;
        &amp;lt;div class="flex-items fruit-4"&amp;gt;Strawberry&amp;lt;/div&amp;gt;
        &amp;lt;div class="flex-items fruit-5"&amp;gt;Cherry&amp;lt;/div&amp;gt;
        &amp;lt;div class="flex-items fruit-6"&amp;gt;Guava&amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;

&amp;lt;/body&amp;gt;

&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h4&gt;
  
  
  style.css
&lt;/h4&gt;


&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container {
    border: 5px solid black;
    display: flex;
}

.flex-items {
    color: #800000;
    font-size: 2rem;
    text-align: center;
}

.fruit-1 {
    background-color: #ff1a1a;
}

.fruit-2 {
    background-color: #ff9933;
}

.fruit-3 {
    background-color: #ffff00;
}

.fruit-4 {
    background-color: #ffb3b3;
}

.fruit-5 {
    background-color: #e60000;
}

.fruit-6 {
    background-color: #66ff66;
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--d8XcU1s9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/l3zdegqkbwya0vscfxpa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--d8XcU1s9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/l3zdegqkbwya0vscfxpa.png" alt="Flexbox"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Note that, when we set the &lt;em&gt;display&lt;/em&gt; value to &lt;strong&gt;flex&lt;/strong&gt;, the items are &lt;em&gt;left-aligned&lt;/em&gt; by default, as a result of which, we have some white spaces at the end.&lt;br&gt;
&lt;br&gt;Let's set the &lt;em&gt;display&lt;/em&gt; value to &lt;strong&gt;inline-flex&lt;/strong&gt; and see what happens !!!🤔&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container {
    border: 5px solid black;
    display: inline-flex;
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7t0Hsif---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ciflj8dxmb1i01n0qimm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7t0Hsif---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ciflj8dxmb1i01n0qimm.png" alt="Flexbox"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We can get rid of the extra spaces. The container only takes up that amount of space required to accommodate its children (flex-items)🤘🎉&lt;/p&gt;

&lt;h3&gt;
  
  
  Flex-direction
&lt;/h3&gt;

&lt;p&gt;Flex-direction property controls how the &lt;em&gt;Flex-items&lt;/em&gt; will be placed inside the &lt;em&gt;Flex-container&lt;/em&gt;. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The possible values of &lt;em&gt;flex-direction&lt;/em&gt; property are:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;row: Arranges the items from left-right (default case)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;row-reverse: Arranges the items from right-left&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;column: Arranges the items from top-bottom&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;column-reverse: Arranges the items from bottom-top&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Lets apply each of these properties and see them in action!!&lt;/p&gt;

&lt;h4&gt;
  
  
  row
&lt;/h4&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container {
    border: 5px solid black;
    display: flex;
    flex-direction: row;
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TdyOK-I0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/3d9f7aiuaop3ak570r1i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TdyOK-I0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/3d9f7aiuaop3ak570r1i.png" alt="Flexbox"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  row-reverse
&lt;/h4&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container {
    border: 5px solid black;
    display: flex;
    flex-direction: row-reverse;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ExzJwj4U--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/uz5dhuljhmlep7dvccsk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ExzJwj4U--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/uz5dhuljhmlep7dvccsk.png" alt="Flexbox"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  column
&lt;/h4&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container {
    border: 5px solid black;
    display: flex;
    flex-direction: column;
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--a3WQK07q--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/6rrxnm2cfekltqth8otu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--a3WQK07q--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/6rrxnm2cfekltqth8otu.png" alt="Flexbox"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  column-reverse
&lt;/h4&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container {
    border: 5px solid black;
    display: flex;
    flex-direction: column-reverse;
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--CbjcYAaN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/yt07qzm62k9ze17a97w9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CbjcYAaN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/yt07qzm62k9ze17a97w9.png" alt="Flexbox"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hope you got a basic idea about how to get started with Flexbox👩‍💻&lt;br&gt;
Keep Learning!!🤘✌️&lt;/p&gt;

</description>
      <category>html</category>
      <category>css</category>
      <category>webdev</category>
      <category>frontend</category>
    </item>
  </channel>
</rss>
