Return value in Python for Loop -


hi want return value after loop. code -

def asd():     data.append("a")     data.append("b")     in range(0,2):         value = data[i]         return value 

i expecting return both , b when calling function returning b. there other method. in advance

unless have pressing reason doing things way, example can simplified

def asd():     return 'a', 'b' 

Comments

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -