html order list code example

Example 1: python sort list in reverse

#1 Changes list
list.sort(reverse=True)
#2 Returns sorted list
sorted(list, reverse=True)

Example 2: html number list

<ol type="1">
	<li>Item 1</li>
	<li>Item 2</li>
	<li>Item 3</li>
</ol>

<ol type="A">
	<li>Item 1</li>
	<li>Item 2</li>
	<li>Item 3</li>
</ol>

<ol type="a">
	<li>Item 1</li>
	<li>Item 2</li>
	<li>Item 3</li>
</ol>

<ol type="I">
	<li>Item 1</li>
	<li>Item 2</li>
	<li>Item 3</li>
</ol>

<ol type="i">
	<li>Item 1</li>
	<li>Item 2</li>
	<li>Item 3</li>
</ol>

Example 3: html ordered list

<ol>
  <lh>ol Header</lh>
  <li>Item One</li>
  <li>Item Two</li>
  <li>Item Thre</li>
</ol>

Example 4: how to get number list in html

<ol>
<li>Example</li>
<li>Example2</li>
<li>Example3</li>
</ol>

Example 5: python sort list

vowels = ['e', 'a', 'u', 'o', 'i']
vowels.sort()

Example 6: list sort python

>>> names = ['Harry', 'Suzy', 'Al', 'Mark']
>>> sorted(names)
['Al', 'Harry', 'Mark', 'Suzy']
>>> sorted(names, reverse=True)
['Suzy', 'Mark', 'Harry', 'Al']

Tags:

Html Example