- 3
#! python # Using Lists as Queues queue = ["Eric", "John", "Michael"] queue.append("Terry") # Terry arrives queue.append("Graham") # Graham arrives print queue s=queue.pop(0) print s s=queue.pop(0) print s print queue
4 Respostas
+ 1
Here you go:
queue = ["Eric", "John", "Michael"]
queue.append("Terry")
queue.append("Graham")
print (queue)
s=queue.pop(0)
print (s)
s=queue.pop(0)
print (s)
print (queue)
+ 1
more multiple line comment you can use ''' or """
0
idenotation is more important in python
0
# sign is used for single line comment