TransWikia.com

Python - arguments to dictionary

Stack Overflow Asked by user13986859 on December 23, 2021

I am tuning my Python script which is taking about 13 seconds of 21 seconds just to search a string inside an array of arrays.

My script accepts any number of csv files as arguments and will read a column of csv file to array inside an parent array. This array will then be used for checking if a member exists in a array as below:

intArray = -1
for childlist in MasterArray:
    intArray += 1
    if 'a' in childlist:
        print(intArray)
        break

Can you please advise how do I handle this case?

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP