fork download
  1. import random
  2.  
  3. def shuffle_str(s):
  4. x = list(s)
  5. random.shuffle(x)
  6. return ''.join(x)
  7.  
  8. print(shuffle_str('aaaabbbbcccc'))
  9.  
  10. print(random.choice('abc'))
  11. for i in range(10):
  12. print(random.randint(1, 3))
Success #stdin #stdout 0.02s 11600KB
stdin
Standard input is empty
stdout
aaccbabccbba
b
1
2
2
2
3
3
2
1
2
2