ymd_ ymd_ - 1 year ago 73
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():

Answer Source

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
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download