I'm writing a code that requires me to import multiple python files that are similiar to that of a .obj file, in the sense that they will create a 3D figure using vertices and lines, etc. The problem is, the files will have the same name for a list (called vertices) in each of the files. For example:

vertices = [(1, 0, 2), (1, 1, 1), (...)]
lines = [(...), (...), (...)]

The problem is, every file will have this, with the same name. Is there a way to make it so that when I import the files, each can be treated seperately?

To help clarify: I'm using the above format in a .py file repeatedly, which requires me to use the same name. Is there a way to use the string vertices and reference it by file?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.