ymd_ ymd_ - 6 months ago 31
Python Question

How to declare a function "to do nothing" in Django

I'm learning Python and Django and i have a question.

I would like to know how to define an function to do nothing and continue with the flow of program execution while i read an archive.

while True:
with open(r'archive.txt') as myfile:
for line in myfile:

¿ FUNCTION to do nothing how can i do it?

def empty():


If you're using Python 2.x:

def empty():

With Python 3.x you can also do this:

def empty():
    ... # this is called Ellipsis, simply three dots in a row