fork download
  1. latest_questions = []
  2.  
  3. for x in range(15):
  4. latest_questions.append(x)
  5.  
  6. print latest_questions
  7.  
  8. latest_questions.append('over')
  9. print latest_questions
  10.  
  11. if len(latest_questions) > 15:
  12. latest_questions.pop(0)
  13.  
  14. print latest_questions
Success #stdin #stdout 0.01s 7896KB
stdin
Standard input is empty
stdout
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 'over']
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 'over']