+ 1
How to create n number of instances of a class in python... ?
â˘I need my user to decide how many instances he needs â˘If the user enters 5 I need to create 5 instances of the class where the user provides the data. https://code.sololearn.com/ctrP1ekc5Brz/?ref=app
1 Answer
+ 1
Thank you for your kind response sir . I solved the issue . All my concepts were correct but i made a mistake .
â˘I just skipped the statement of appending 0's
â˘As I tried to assign values to empty list using index values -- The compiler said list index out of range .
â˘I thought that i could not process an object as a data in the list . So it pops some random error.
â˘I learnt this today.