Sort names with Python's random module

# coding: utf-8
import random

nameList = []

print('Make a list. Please enter your name.')
name = input('=>')
nameList.append(name)
print(name + 'Added.')

print('The name currently registered is' + '\n' +
str(nameList) + '\n' +
'is.')

answerWord = input('Do you want to add more names? yes/no?: ')
while not(answerWord == 'no' or answerWord == 'n'):
    name = input('=>')
    nameList.append(name)
    print(name + 'Added.')
    print('The current list is' + '\n' +
    str(nameList) + '\n' +
    'is.')
    answerWord = input('Do you want to add more names? yes/no?: ')

print('Finish adding.')
print('Shuffle START!!')
random.shuffle(nameList)
print('The order is' + '\n' +
str(nameList) + '\n' +
'became.')

Recommended Posts

Sort names with Python's random module
Sort random FizzBuzz columns with quicksort
Getting Started with Python's ast Module (Using NodeVisitor)
How to create random numbers with NumPy's random module
Regarding Python's Sort method
I tried to sort a random FizzBuzz column with bubble sort.
How to output additional information when logging with python's logging module
Sort Python module imports alphabetically
Notes on python's sqlite3 module
Numpy random module random number generator
Sort huge files with python
Rename column names with django-south
Bubble sort with fluffy animation
Play with ASE MD module
Create a compatibility judgment program with the random module of python.