Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Importing acting weird
#3
Now I have another problem. I moved all the functions to the "mainTest.py" module. Here is what happens.

def function1():
     listName = [0,0,0,0]
     return listName


list1 = function1()
Error:
error: list1 not defined
Reply


Messages In This Thread
Importing acting weird - by IILawrenceII - Jan-24-2020, 07:43 PM
RE: Importing acting weird - by micseydel - Jan-24-2020, 07:52 PM
RE: Importing acting weird - by IILawrenceII - Jan-24-2020, 08:04 PM
RE: Importing acting weird - by Marbelous - Jan-24-2020, 09:17 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  openpyxl rename sheet acting strange Pedroski55 1 2,135 Sep-26-2022, 08:56 AM
Last Post: buran
  breaking a large program into functions, not acting as expected Zane217 9 3,194 Sep-18-2021, 12:37 AM
Last Post: Zane217
  Nested dictionary acting strange Pedroski55 2 2,223 May-13-2021, 10:37 PM
Last Post: Pedroski55

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020