Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
A list is shuffled and reshuffled till the 0th index of the list matches
#python 3.5.2 list1=[1,2,3,4,5,6,7] from random import shuffle shuffle(list1) c1=0 for a in list1: shuffle(list1) c1+=1 if list1[0]==1: print(list1) break else: print(list1) continue print('{0}th times c'.format(c1))
run
|
edit
|
history
|
help
0
instance variable class var
PySRP
Brother's share
Принцип наименьшего времени Ферма
Game4
Gift_Card Interview SQL Analysis Conducted by Miranda Zhao
sainik
Faiha - L6
ElaineBrown** rextester.com
we