Forum Discussion

nikhiltadi's avatar
nikhiltadi
New Contributor
3 years ago

Test complete Desktop Application Python - Not able to append elements to a list

Hi Team,

I'm using test complete for desktop automation using python programming language. Suppose, just say there is a elements which needed to be added into list.

When i try append elements into a list and then try to print it.It is returning empty.

 

#sample code

def main():

     list = []

     element = "apple"

     list.append(element)

     print(list)

 

Expected Output:

 ['apple']

 

Actual Output:

 empty

 

Note:

Same is the case when on using insert,append,add