Created
May 23, 2013 01:29
-
-
Save hfm/5632191 to your computer and use it in GitHub Desktop.
席替えスクリプト for ppb 13' engineer.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strict; | |
use List::Util; | |
my @name_list = ( "おっくん", "きたけー", "たけお", "ぐっさん" ); | |
my @s_name_list = List::Util::shuffle @name_list; | |
print join(", ", @s_name_list); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
import random | |
import sys | |
reload(sys) | |
sys.setdefaultencoding('utf-8') | |
name_list = [ | |
u"おっくん", | |
u"きたけー", | |
u"たけお", | |
u"ぐっさん" | |
] | |
random.shuffle(name_list) | |
print name_list[0], name_list[1], name_list[2], name_list[3] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
name_list = [ | |
"おっくん", | |
"きたけー", | |
"たけお", | |
"ぐっさん" | |
] | |
random.shuffle(name_list) | |
print(name_list) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment