Hi, I am new to python (in fact this is my 2nd day learning it)

I was given code that resembles:

if xyz
                  #do abc
                  return x

              else
                  return y

        return[]

What does the return[] do? Sorry if this is a stupid question.;)

[] means an empty list in python.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.