more with lists example the choice function also works with stringspicking random character from string here is an example that uses choice to fill the screen with bunch of random characters from random import choice 'abcdefghijklmnopqrstuvwxyz !@#$%^&*(for in range( )print(choice( )end''example here is nice use of shuffle to pick random ordering of players in game from random import shuffle players 'joe ''bob ''sue ''sally 'shuffle(playersfor in playersprint( 'it is your turn 'code to play the game goes here example here we use shuffle divide group of people into teams of two assume we are given list called names shuffle(namesteams [for in range( ,len(names), )teams append([names[ ]names[ + ]]each item in teams is list of two names the way the code works is we shuffle the names so they are in random order the first two names in the shuffled list become the first teamthe next two names become the second teametc notice that we use the optional third argument to range to skip ahead by two through the list of names split the split method returns list of the words of string the method assumes that words are separated by whitespacewhich can be either spacestabs or newline characters here is an examples 'hithis is test print( split()['hi!''this''is'' ''test 'as we can seesince split breaks up the string at spacesthe punctuation will be part of the words there is module called string that containsamong other thingsa string variable called punctuation that contains common punctuation we can remove the punctuation from string with the following code