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
emoji replace
sensi
print
Pierwiastkowanie
shiva
https://rextester.com/HYVN80193
tip calculation
hi
guess123
My cousin asked for this will never forgive her