10/23/2014

Using Python to generate humorous memos

The Python programming language lets you generate humorous memos automatically. This document includes an example Python 3 program that generates random humorous memos. This code includes word lists (arrays), function definitions, and nested while loops. The word lists contain various verbs, adverbs, objects, adjectives and subjects for use in sentences. The program code defines functions that select random words to generate sentences. The nested while loops generate paragraphs and sentences. 

Python is free to download, install, and use. It's easy to program and delightful to run. Before trying the example program in this document, you need to install Python 3 on your computer. For more information, see Getting started with Python programmingFor information about random functions, see Using Python random functions to create new words.

Example Python program for automatic memos

Figures 1 through 3 show example Python code that can generate automatic memos. To run this code on your computer, do the following:
  1. Install Python 3 if you've not already done so.
  2. Run the interface development environment (IDE) for your Python 3.
  3. Copy AutomaticWriter and then paste it into an appropriate Python 3 window.
  4. Run the program and, at the prompt, type the number of paragraphs you want in your memo, such as 4.
  5. Press Enter to generate and display a random memo with a random title, such as 'Radically Downsize Plaintiffs."
  6. Repeat steps 4 and 5 until the program generates a sufficiently humorous memo. You can save your memo by copying its text to a word processor.
  7. Experiment with this program by modifying your copy of it. For example, you can add words and phrases most appropriate to your friends. 

Word lists 

The Python lists in Figure 1 contain the possible words and phrases that can appear in a memo generated by this Python program. The name of each list describes the grammatical function of its items:
  • ucverb -- upper-case verbs, such as Exploit or Ridicule
  • lcverb -- lower-case verbs, such as exploit or ridicule
  • ucadvrb -- upper-case adverbs, such as Carefully or Instantly
  • lcadvrb -- lower-case adverbs, such as carefully or instantly 
  • objct -- objects, such a customers or safety inspectors
  • adjctv -- adjectives, such as uninspired or repugnant
  • sbjct -- subjects, such as We or Human resources
  • auxlry -- auxiliaries, such as should always or must
  • ttlobj -- title objects, such as Regulators or Wall Street Brokers
Figure 1 - These lists contain words and phrases as verbs, adverbs, objects,
adjectives, subjects, auxiliaries, and title objects. When the the Python code in
Figure 3 calls the 
title () function, it randomly chooses title words,
concatenates them, and then returns the title to the function caller.
The 
sntnc01 () function similarly defines sentence type 01.

Function definitions

The functions defined in Figures 1 and 2 make random.choice () function calls to return random words or phrases for the title and six sentence types. For example, the title () function is:
def title (ucadverb,ucverb,ttlobj):
    a = random.choice (ucadvrb)
    b = 
random.choice (ucverb)
    c = random.choice (ttlobj)
    r = a + ' ' + b + ' ' + c
    return
(r)

When the code in Figure 3 calls the title () function, it makes three random.choice () function calls that select:
  • One upper-case adverb from the ucadvrb list
  • One verb from the ucverb list
  • One title object from the ttlobj list
The title () function then concatenates these words and returns them as the title of the automatic memo. Likewise, when the code in Figure 3 calls one of the sentence-type functions below, it returns an appropriate sentence:
  • The sntnc01 () function makes three random.choice () function calls that select three words for sentence type 01, concatenates those words, and then returns them as a sentence type 01 within the automatic memo. Note: Figure 1 includes the sntnc01 () function. Figure 2 includes the sntnc02 () through sntnc06 () functions.
  • The sntnc02 () function makes three random.choice () function calls that select three words for sentence type 02, concatenates those words, and then returns them as a sentence type 02 in the automatic memo.
  • The sntnc03 () function selects, concatenates and returns four words for sentence type 03.
  • The sntnc04 () function selects, concatenates and returns five words for sentence type 04.
  • The sntnc05 () function selects, concatenates and returns four words for sentence type 05.
  • The sntnc06 () function selects, concatenates and returns five words for sentence type 06.
Figure 2 - These functions define sentence types 02 through 06. [Note: Figure 1 includes the sntnc01 () function.] When the Python code in Figure 3 calls any sentence-type function, sntnc01 () through sntnc06 (), it randomly chooses sentence words or phrases, concatenates them, and then returns them as a sentence.

Nested while loops

The Python code in Figure 3 generates a random memo as follows:
  1. The title () function generates a random title.
  2. The outer while loop generates a user-specified number of paragraphs. Each pass through the outer (paragraph) loop:
    1. Calls the random.randint () function to specify between three to nine sentences as the paragraph length. 
    2. The inner loop generates sentences. Each pass through the inner (sentence) loop:
      1. Calls the the range (1,6) function to set the switch value to 1 to 6.
      2. Calls the random.choice (switch) function to call a sentence-type function,  sntnc01 () to sntnc06 (). The sentence-type function generates its random sentence.
      3. Concatenates the sentence to the paragraph.
    3. Calls the print () function to display the paragraph.
  3. Various print () functions display ending text, such as corporate guidance and manager names.
Figure 3 - These nested while loops create paragraphs and sentences. The user specifies the number of paragraphs; the outer while loop runs for each paragraph. The inner while loop calls 3 to 9 sentence-definition functions for each paragraph.

Example reformatted memo

If you wish to format any random memo generated by your Python 3 program, simply copy its text and then paste it into a word processor document as shown in Figure 4.
Figure 4 - This automatic memo was copied to a  word-processor
document, and then exported as a PDF.

10/17/2014

Using Python random functions to create new words

The Python programming language lets you randomly select syllables and then concatenate (combine) them to generate new words. This document explains how to control syllable concatenation through Python random functions.

Python is free to download, install, and use. It is easy and fun to program. Before trying the examples in this document, you need to install Python 3 on your computer. For more information, see Getting started with Python programming.

Using Python random functions

Python random functions generate random values that you can use directly or for other purposes, such as selecting list items randomly. For more information, about random functions, see see Wikibooks: Python Random Numbers. For really geeky details, see Python Library: Random Numbers.

Figure 1 shows how you can use a few fundamental Python random functions. If you want try this code, you can either type it from Figure 1 or copy it from its NwWrdsRdmBasics online example.

Figure 1 - This example Python code demonstrates a few random-function 
capabilities, such as basing random values on the computer clock, 
returning a random floating point value, returning a random integer value,
 and returning a random item from a list.
In Figure 1:
  • The 'import random' statement imports the Python random module so that you can use random functions in this example code.
  • The random.seed() function bases all random functions on the computer clock.
  • Each print() function displays the number or string returned by its random function.
  • The random.random() function returns a random floating point (decimal) value, 00 through 1.0.
  • Each random.randint(a,b) function returns a random integer (whole number) value, in the range a through b.
  • The random.choice(y) function randomly selects and returns one item from list y.
Figure 2 demonstrates how you can use two Python random functions to create a large random decimal value. If you want try this code, you can either type it from Figure 2 or copy it from its NewWrdsRdmLgFloat online example.

Figure 2 - This example Python code demonstrates
creating a large random decimal value.
In Figure 2:
  • The 'a = random.random()' statement assigns a floating point value, 0.0 through 1.0, to variable a.
  • The 'b = random.randint(0,999)' statement assigns an integer value, 0 through 999, to variable b.
  • The 'c = a + b' statement assigns the sum of a and b to variable c.
  • The print (c) function displays a large random decimal value, such as 467.33257201.

Concatenating Strings in Python

A string is a variable that consists of one or more characters. Python lets you concatenate strings by placing them in sequence with no spaces among them. In Python, plus signs let you either add numerical values or concatenate strings.

Figure 3 demonstrates adding numerical values and concatenating strings.

Figure 3 - This example Python code demonstrates
using plus signs to either add values or concatenate strings

In Figure 3:
  • The 'd = a + b + c' statement assigns the sum of a, b, and c to variable d. Variables a, b, and c must be numerical values; for addition, none can be strings.
  • The 'h = e + f + g' statement assigns concatenated strings e, f, and g to variable h. Variables e, f, and g must be strings; for concatenation, none can be numerical values.

Creating New Words in Python

To create a new word in Python, you need to randomly choose syllable strings from a list, and then concatenate those syllables.

Note: Beyond demonstrating Pythom random functions and concatenation, creating new words can be useful. For example, if you write science fiction, you can use a Python program to create new space-alien expletives, such as "tulktokloogkek," "garfblugtonk," and "loogblug." However, you need not write science fiction. For example, if you are expecting a baby, why not give him or her an original name, such as "Depgarf?"

Figure 4 shows how you can use Python random functions and concatenation to create a two-, three-, four-, or five-syllable new, random word.

Figure 4 - This example Python code demonstrates
randomly selecting syllables from a single list of strings,
and then concatenating them to create a new word.
Syllables can repeat sequentially
In Figure 4:
  • The 'w = random.randint(2,5)' statement assigns an integer value, 2 through 5, to variable w. This determines whether the new word contains two, three, four, or five syllables.
  • The 'c = random.choice(y)' statement assigns one random syllable string, from list y, to variable c. Likewise, the 'd = random.choice(y)' statement assigns one random syllable to variable d. Note: Variables c and d apply to words that have two or more syllables. Variable e applies to words that have three, four or five syllables.  Variable f applies to words that have four or five syllables. Variable g applies to words that have five syllables.
  • The 'if w == 2:' control flow statement executes the 'print (c + d)' function, which concatenates and displays a two-syllable word, only if w is equal to 2.
  • The 'elif w == 3:' control flow statement executes the 'e = random.choice(y)' statement and the 'print (c + d +e)' function, which concatenates and displays a three-syllable word, only if w is equal to 3.
  • The 'elif w == 4:' control flow statement executes the 'e = random.choice(y)' statement, the 'f = random.choice(y)' statement, and the 'print (c + d +e +f)' function, which concatenates and displays a four-syllable word, only if w is equal to 4.
  • The 'elif w == 5:' control flow statement executes the 'e = random.choice(y)' statement, the 'f = random.choice(y)' statement, the 'g = random.choice(y)' statement, and the 'print (c + d +e +f +g)' function, which concatenates and displays a five-syllable word, only if w is equal to 5. Note: If you wish, you can edit the syllable strings in list y. You can also add or delete them.
Figure 5 shows how you can modify the example code in Figure 4 so that it prevents sequential duplicate syllables. (After all, many kids might ridicule one named 'zotzot.')

Figure 5 - This example Python code demonstrates
randomly selecting syllables from two lists of strings,
and then alternately concatenating the strings to create a new word.
Syllables cannot repeat sequentially.
In Figure 5:
  • The 'x = random.randint(0,1)' statement assigns either 0 or 1 to variable x.
  • Lists y and z each contain half the syllable strings.
  • The if and else control flow statements determine which list provides the first syllable. If x is 0, list a is a switched copy of list y, and list b is a copy of list z. If x is 1, list a is a copy of list z, and list b is a copy of list y.
  • The remaining code in Figure 5 is similar to that in the Figure 4.

10/14/2014

Getting started with Python programming

Python is a powerful, high-level, object-oriented programming language. It's free to download and install because it's open-source software. In comparison with other programming languages, it has a simpler, more-intuitive syntax. Therefore, as this document shows, Python is easy to learn and fun to use. For more information, see the following Python tutorials:
You can choose either of two Python versions, 2 or 3. Python 2 is primarily a legacy version. Therefore, you should probably choose version 3 unless you specifically need Python 2. For more information, see Should I use Python 2 or Python 3?

Python is probably already installed on your computer. If not, you can install it according to information in Python Setup and Usage. Currently, in October, 2014, Python 3.4 is the newest version.

Note: Though tested on Xubuntu 14.04, the procedures in this document generally apply to Python on all PC operating systems; Linux, OS X, and Windows. Xubuntu is an XFCE-desktop distribution of the Ubuntu Linux operating system.

This document can help you:
  • Install IDLE, which is an Integrated Development Environment (IDE) for Python.
  • Write your first Python program.
  • Run your first Python program.
  • Run example Python programs that demonstrate:
    • Math operations
    • While loops
    • Nested while loops
Installing IDLE
Although you can program Python through your command-line terminal, programming through IDLE is easier. Install IDLE according to your particular operating system. For example, to install IDLE on Xubuntu 14.04, do the following:
  1. Click Applications Menu (a white-mouse icon at the upper left of the screen) to display the Applications Menu.
  2. Click Ubuntu Software Center to display its window, type python into the search field, and then select IDLE (using Python 3.4).
  3. Click Install to display the Authenticate window, type your password, and then click Authenticate.
  4. After you have installed IDLE, close the Ubuntu Software Center window.
Note: The Ubuntu Software Center has a nice feature that can display the path to a software package you have just installed. For example, after you install IDLE (using Python-3.4), you can click More info to display Applications > Programming > IDLE (using Python-3.4). Of course, this applies only to software that you can launch through the Applications Menu.

Writing your first Python program
To write your first Python program through IDLE, do the following:
  1. Install IDLE according to the section above.
  2. Create a folder in which to store your Python programs. For example, you can create a MyPython folder within your home folder.
  3. As shown in Figure 1, click the white-mouse Applications Menu, select Development, and then click IDLE (using Python 3.4) to display a Python Shell window as shown in Figure 2.
    Figure 1 - Starting IDLE
    Figure 2 - Python Shell
  4. Click File, and then click New Window to display an Untitled program window.
  5. Type a Python program, such as the Example Python Hello code shown in Figure 3. Note: To enter a comment into a Python program, type # before the comment text. Computers do not execute comments. The Python interpreter ignores all comments while converting your program statements to machine code.
    Figure 3 - Writing your first Python program
  6. Click File, click Save as, select your MyPython folder, type a file name such as hello.py, and then click Save.
  7. Close both IDLE windows, which are the Python Shell and the program window.
  8. Test your program by running it according to the section below.
Running your first Python Program
To run your first Python program through Idle, do the following:
  1. Click Applications, select Programming, and then click IDLE (using Python 3.4) as shown in Figure 1.
  2. In the Python Shell, click File, click Open, select your MyPython folder, select the program you want to run, such as hello.py, and then click Open to display the program window.
  3. Click Run, and then click Run Module to run your program. It displays its output in the Python Shell as shown in Figure 4.
    Figure 4 - Testing your first Python program
  4. Close both IDLE windows, which are the Python Shell and the program window.
Running example Python programs
After writing and running your first Python program according to the sections above, you can copy and run other example Python programs, such as those that demonstrate:
  • Math operations
  • While loops
  • Nested while loops
Running example Python math operations - The Example Python program in Figure 5 demonstrates a few Python math operations and functions:
  • Included math operations let you enter two variables for:
    • Addition
    • Subtraction
    • Multiplication
    • Division
    • Raising a value by an exponent
    • Finding the root of a value
  • Included functions are:
    • float(), which defines a decimal value function
    • input(), which lets a user enter a value
    • print(), which displays data on a computer screen
Figure 5 - Example Python math operations
To enter a value for a variable, you can use an input() function nested within a float() function. An input() function can contain text in quotes to prompt data entry. The nested float(input()) function defines its data as a decimal value. For example, if you type 3, the data is 3.0.

The print() function displays data in a window, it does not print on paper. The print() function can display text in quotes, one or more variables, or both. Additionally, the print() function can contain and display a math operation, such as x+y.

To write and run the Example Python Math Operations program, do the following:
  1. As shown in Figure 1, click the white-mouse Applications Menu, select Development, and then click IDLE (using Python 3.4) to display a Python Shell window as shown in Figure 2.
  2. Click File, and then click New Window to display an Untitled program window.
  3. Type the Example Python Math Operations code shown in Figure 5. Note: As a new programmer, you can learn more by typing all this code. However, as an alternative, you can copy the code from XmplMathOperations and then paste it into the program window.
  4. To save your program for later use, click File, click Save as, select your MyPython folder, type a file name, such as xmplmath.py, and then click Save.
  5. In the program window, click Run, and then click Run Module to run your program in the Python Shell window. While your program is running, follow its prompts to enter data and/or make selections.
  6. Run the program multiple times, experimenting with different values for the x and y variables.
Running an example Python while loop - The Example Python program in Figure 6 demonstrates the Python while and if statements.
Figure 6 - Example Python while loop
Variable t is the total. Variable m is maximum total limit. The while statement defines the start of the while loop, which loops while t<=m (the total is less than the limit). Each time the loop runs, you can add a value to the total. As soon as the total exceeds its limit, the if statement ends the loop, and stops printing the Current Total.

To write and run the Example While Loop program, do the following:
  1. As shown in Figure 1, click the white-mouse Applications Menu, select Development, and then click IDLE (using Python 3.4) to display a Python Shell window as shown in Figure 2.
  2. Click File, and then click New Window to display an Untitled program window.
  3. Type the Example Python While Loop code shown in Figure 6. Note: As an alternative, you can copy the code from XmplWhileLoop and then paste it into the program window.
  4. To save your program for later use, click File, click Save as, select your MyPython folder, type a file name, such as xmplwhile.py, and then click Save.
  5. In the program window, click Run, and then click Run Module to run your program in the Python Shell window. While your program is running, follow its prompts to enter data and/or make selections.
  6. Run the program multiple times, experimenting with different values for the t, m, and v variables.
Running example Python nested while loops - The Example Python program in Figure 7 demonstrates how to run one while loop within another. The outer while loop is new. The inner while loop is the same as the Example While Loop in the section above.
Figure 7 - Example Python nested while loops
The variable i counts how many passes the outer loop has made. The variable p defines how many passes the outer loop can make. The int() function defines p as an integer value (no decimal point). Within each outer loop pass, the inner loop runs while t<=m (the total is less than the limit). Each time the inner loop runs, you can add value to the total. As soon as the total exceeds its limit, the if statement ends the inner loop, and stops printing the Current Total. The outer loop stops running after i is equal to or greater than p.

To write and run the Example Nested While Loops program, do the following:
  1. As shown in Figure 1, click the white-mouse Applications Menu, select Development, and then click IDLE (using Python 3.4) to display a Python Shell window as shown in Figure 2.
  2. Click File, and then click New Window to display an Untitled program window.
  3. Type the Example Python While Loop code shown in Figure 7. Note: As an alternative, you can copy the code from XmplNestedWhileLoops and then paste it into the program window.
  4. To save your program for later use, click File, click Save as, select your MyPython folder, type a file name, such as xmplnestedwhile.py, and then click Save.
  5. In the program window, click Run, and then click Run Module to run your program in the Python Shell window. While your program is running, follow its prompts to enter data and/or make selections.
  6. Run the program multiple times, experimenting with different values for the i, p, t, m, and v variables.

















10/12/2014

Reformatting text that you've copied into Blogger

Copying text among writing tools can interfere with various text formats. For example, if you copy word-processor text and then paste it into Google Blogger, it is not formatted the same as text that you type directly into Blogger. This document can help you work around the formatting incompatibilities among writing tools. For example, it can help you reformat text that you've copied into Blogger.

Note: Although this document specifically applies to reformatting text copied into Blogger, it generally applies to reformatting text copied among other writing tools. No two writing tools, whether online or off, are fully compatible. Online writing tools include Google Blogger, Google Docs and Wordpress. Offline writing tools include LibreOffice Writer, Microsoft Word and Appache OpenOffice Writer.

Copying text into Blogger
To copy text from a word processor into Blogger, do the following:
  1. Write the text in the word processor in any online or offline word processor, such as Google Docs in Google Drive, Writer in LibreOffice, or Word in Microsoft Office. 
  2. In your word processor, select (highlight) the text to copy, such as the example LibreOffice Writer text in Figure 1, and then press Ctrl+C to copy that text.
    Figure 1 - Selecting text within LibreOffice Writer
  3. In Blogger, place you cursor where you wish to insert the text, and the press Ctrl+V to paste the text into Blogger as shown in Figure 2.
    Figure 2 - Pasting text from LIbreOffice Writer into Blogger.
  4. Remove the formatting from the copied text according to the section below.
Removing the copied formatting
To remove all formatting from your pasted text, do the following:
  1. Add several blank lines below the text you had copied from your word processor as shown in the top portion of Figure 3.
    Figure 3 - Copying word-processed text (top portion) from within Blogger,
    and then pasting it as text-only text (bottom portion) to within Blogger.
  2. Select the copied text and then press Ctrl+C.
  3. Below your copied text, place your cursor at the start of a blank line.
  4. Press Ctrl+Shift+V to paste the text as text-only, which removes its formatting as shown in the bottom portion of Figure 3.
  5. Reformat your new text-only text according to the section below.
Reformatting your new text-only text
After you make a text-only copy for you word-processor text according the section above, you need to reformat that text. As demonstrated in the Example subsections below, separately select each item (such as word, phrase, or list) that you need to reformat, and then use the icons in the Blogger Compose toolbar (Figure 4). Tool-tip text describes each icon as you move your mouse pointer over it.
Figure 4 - The Blogger Compose toolbar consists of formatting icons.
Example italic formatting - In the first paragraph of the word-processor-text, within the top portion of Figure 3, you find an italicized sentence, "This sentence is italicized." To match that formatting within the bottom portion, you would do the following:
  1. Find the same sentence in the first paragraph of the text-only, bottom portion.
  2. Select This sentence is italicized, and then click the Italic icon.
  3. Verify the reformatted italic text as shown within the first line of Figure 5.
    Figure 5 - Text-only text reformatted to italic.
Example bold and italic formatting - In the first paragraph of the word-processor-text, within the top portion of Figure 3, you find a bold and italicized sentence, "This sentence is bold and italicized." To match that formatting within the bottom portion, you would do the following:
  1. Find the same sentence in the first paragraph of the text-only, bottom portion.
  2. Select This sentence is bold and italicized, click the Bold icon and then click the Italic icon.
  3. Verify the reformatted bold and italic text as shown within the second and third lines of Figure 6.
    Figure 6 - Text-only text reformatted to bold and italic.
Example list formatting - The word-processor-text in the top portion of Figure 3 includes both an ordered, numbered list and an unordered, bulleted list. To reformat these lists in the bottom portion of Figure 3, you would do the following:
  1. Find the text for the numbered-list items in the text-only, bottom portion.
  2. Select the numbered-list items, and then click the Numbered list icon to number and indent the items.
  3. Find the text for the bulleted-list items in the text-only, bottom portion.
  4. Select the bulleted-list items, and then click the Bullet list icon to bullet and indent the items.
  5. Verify the reformatted lists as shown in Figure 7.
    Figure 7 - Text-only lists reformatted to numbered and bulleted lists.
Deleting unwanted line spaces from lists
If the text you've copied into Blogger includes any numbered or bulleted lists, you need to delete all unwanted line spaces from those lists. For more information, see Deleting unwanted line spaces from Blogger lists.

Note: As shown in Figure 7, you cannot see the unwanted line spaces in your lists until after you have closed your post for the first time after reformatting your pasted lists. Therefore, to avoid possible future confusion, you should immediately delete your unwanted line spaces.

To delete unwanted line spaces from the lists in your pasted text, do the following:
  1. Click Save and then Close. This initial closing makes the unwanted line spaces visible.
  2. Reopen your post to edit it. You should now see unwanted line spaces similar to those in Figure 8. When there are no unwanted line spaces in each list, there is only one line space above, and one below.
    Figure 8 - Unwanted line spaces in Blogger lists.
  3. Above each list, place your cursor immediately below the preceding paragraph, and then press Backspace.
  4. Below each list, place your cursor immediately above the following paragraph, and then press Backspace.
  5. Verify that line spacing is again correct, as shown in Figure 7.
Note: After reformatting all your text-only text, such as the bottom portion of Figure 3, you can delete the text you had originally copied from your word processor, such as the top portion of Figure 3.

10/08/2014

Deleting unwanted line spaces from Blogger lists

Currently, as of October 2014, Google Blogger adds an extra, unwanted line space both above and below each new ordered (numbered) or unordered (bulleted) list. These unwanted line spaces cause confusion because they are invisible, even in Blogger preview, until you close your post for the first time after adding one or more lists.

This document explains how to create lists in a Blogger post, and then delete the unwanted line spaces before they can cause confusion.

Creating an ordered list
To create an ordered list in a Blogger post, do the following:
  1. Type the list items between two paragraphs.
  2. As shown in Figure 1, select (highlight) the items in a list to which you wish to add numbers, and then click the Numbered list icon in the Compose toolbar.
    Figure 1 - Creating a numbered list
  3. Either make additional edits, such as adding more lists, or go to the Deleting unwanted line spaces section below.
Creating an unordered list
To create an unordered list in a Blogger post, do the following:
  1. Type the list items between two paragraphs.
  2. As shown in Figure 2, select (highlight) the items in a list to which you wish to add bullets, and then click the Bullet list icon in the Compose toolbar.
    Figure 2 - Creating a bulleted list
  3. Either make additional edits, such as adding more lists, or go to the Deleting unwanted line spaces section below.
Deleting unwanted line spaces
After writing a post in which you have created one or more lists according the sections above, you need to delete the unwanted line spaces from those lists.

Note: You cannot see the unwanted line spaces in your lists until after you have closed your post for the first time after creating your lists. Therefore, to avoid possible future confusion, you should immediately delete your unwanted line spaces.

To delete unwanted line spaces from your lists, do the following:
  1. Create one or more lists according to the sections above.
  2. Click Save and then Close. This initial closing makes the unwanted line spaces visible.
  3. Reopen your post to edit it. You should now see unwanted line spaces similar to those in Figure 3. When there are no unwanted line spaces in each list, there is only one line space above, and one below.
    Figure 3 - Unwanted line spaces in two lists
  4. Above each list, place your cursor immediately below the preceding paragraph, and then press Backspace.
  5. Below each list, place your cursor immediately above the following paragraph, and then press Backspace.