Problem
I have a program that uses a module I made, so the code would look a bit cleaner. The main program has a list that has 39 “tuple” items that get transferred into the python module. I printed the list in the module and it was duplicated.
Example:
In the main program:
items = [(hello, bye), (win, lose), (big, small), (good, bad)]
In the module:
[(hello, bye), (win, lose), (big, small), (good, bad)][(hello, bye), (win, lose), (big, small), (good, bad)]
I don’t know what is the problem
Code
Main program
import my_module
items = [(hello, bye), (win, lose), (big, small), (good, bad)]
my_module.my_function(items)
Module
class my_function(data):
def init(self, data):
self.data = data