I use this code in python37 and it generates numbers in the list, but I would also like it to create this name along with it for the list name.
The code just does this:
[1,2,3,4]
This is the name I hoping for to add it to it on the fly:
lst1z
Here is the result for what I hope someone can edit the code to make it do this:
lst1z = [1,2,3,4]
So here is my code Thanks:
     composites=[]
     n = int(input("Enter any number : "))
     positive_n = abs(n)
     for num in range(positive_n+1):
         if num > 1:
            for i in range(1, num,1):
                 if (num % i) == 0:
                     if n > 0:
                composites.append(num)
            else:
                composites.append(-num)
            break
      print ("\ncomposites from", int(positive_n / n), " to ", n, "\n", composites)
 
    