Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def main():
- def process(data):
- .....
- def process1(data):
- .....
- def process2(data):
- .....
- def run():
- test = choice([process,process1,process2])
- test(data)
- run()
- main()
- import random
- def main():
- def process(data):
- return data + [0]
- def process1(data):
- return data + [9]
- def process2(data):
- return data + [7]
- def run(data):
- test = random.choice([process,process1,process2])
- print test(data)
- for i in range(7):
- run([1, 2, 3])
- main()
- [1, 2, 3, 7]
- [1, 2, 3, 0]
- [1, 2, 3, 0]
- [1, 2, 3, 7]
- [1, 2, 3, 0]
- [1, 2, 3, 9]
- [1, 2, 3, 9]
- random.choice(seq)
- from random import choice
- import random
- def main():
- def process(data):
- .....
- def process1(data):
- .....
- def process2(data):
- .....
- def run():
- test = random.choice([process,process1,process2])
- test(data)
- run()
- main()
- import random
- from pygame import mixer
- def ms1():
- mixer.init()
- mixer.music.load('/Users/anonsec/Downloads/song_music/Levitate.mp3')
- mixer.music.play()
- def ms2():
- mixer.init()
- mixer.music.load('/Users/anonsec/Downloads/song_music/GoldDust.mp3')
- mixer.music.play()
- def ms3():
- mixer.init()
- mixer.music.load('/Users/anonsec/Downloads/song_music/illenium.mp3')
- mixer.music.play()
- random.choice([ms1,ms2,ms3])()
Add Comment
Please, Sign In to add comment