Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Ganesh Pal Newsgroups: comp.lang.python Subject: Calling a list of functions Date: Sun, 13 Dec 2015 22:56:31 +0530 Lines: 30 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de s7nGSxLwxu+/J4Uo+WU1ewZoCA7j568EZ1Mqhx5unCuw== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.019 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'skip:[ 20': 0.03; 'python': 0.10; '2.7': 0.13; 'def': 0.13; 'received:io': 0.16; 'received:psf.io': 0.16; 'try:': 0.18; 'team,': 0.18; 'to:name :python-list@python.org': 0.20; 'subject:list': 0.26; 'linux': 0.26; 'message-id:@mail.gmail.com': 0.27; 'function': 0.28; 'fine': 0.28; 'print': 0.30; 'code': 0.30; 'run': 0.33; 'except': 0.34; 'list': 0.34; 'received:google.com': 0.35; 'received:209.85': 0.36; 'to:addr:python-list': 0.36; 'received:209': 0.38; 'test': 0.39; 'to:addr:python.org': 0.40; 'your': 0.60; 'share': 0.61; 'sample': 0.63 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=ClQNj9FdwSYEt2bhQyoF1mn1XZSAJGjVni/Wtox81PY=; b=BYzkEmVSIyyNTgi9xWhvaUd14VQYJnd1Ow8wuIstDlQRDz24gqVLapjPxQTPEITEOo 9qb1BuEWrz5g3DVuP97d7kxBcIOTew9i/wdfLFT3QFwKHy1r1Zwho7MEUlMtUQzaH0Oq 91pQaPE9pf/tJVWyqGOeFLb7h0JBzMjRoaM6D6eflBWDew0egZHqgH3ExIHXXt9JmZab SLDy5ARsMwi1VOTuVPSMuj1YU5N+eShfhoMcJgd4GDRotYo5K8p7GC8x7Uo6S+56UFT5 tNTMm1U8inGsGxuDOQYMA/MDSeA5eixhilTpfhIwv2pdXp+zDtv0t0pGrAkcl2BkVHVU YI7A== X-Received: by 10.25.144.65 with SMTP id s62mr9550328lfd.104.1450027591460; Sun, 13 Dec 2015 09:26:31 -0800 (PST) X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:100379 Hi Team, Iam on linux and python 2.7 . I have a bunch of functions which I have run sequentially . I have put them in a list and Iam calling the functions in the list as shown below , this works fine for me , please share your opinion/views on the same Sample code : def print1(): print "one" def print2(): print "two" def print3(): print "three" print_test = [print1(),print2(),print3()] //calling the function for test in range(len(print_test)): try: print_test[test] except AssertionError as exc: Regards, Ganesh