title: Need to get following output : `<<<<<>>>===` from Input `str1='<><<>>=<==<'` using python
body: <p>I have a scenario where i am trying to print the input in sequence like below:</p>
  <ul>
  <li>First need to print less than symbol</li>
  <li>then Greater than symbol</li>
  <li>after then equal to symbol</li>
  </ul>
  <p>As I know only below approach to get the Output, is there any concise approach to get the expected output with few lines of code</p>
  <p>I am not aware of any another approach than below , if any other approach solution is appreciated</p>
  <p><strong>My Code:</strong></p>
  <pre><code>str1='&lt;&gt;&lt;&lt;&gt;&gt;=&lt;==&lt;'
  c=[]
  e=[]
  f=[]
  d=[]
  for a in str1:
      if a==&quot;&lt;&quot;:
          c.append(a)
  for i in str1:
      if i==&quot;&gt;&quot;:
          e.append(i)
  for y in str1:
      if y==&quot;=&quot;:
          f.append(y)
  d=c+e+f
  print(d)
  </code></pre>
  <p><strong>Expected Output :</strong></p>
  <pre><code>&lt;&lt;&lt;&lt;&lt;&gt;&gt;&gt;===
  </code></pre>