Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Variables not returning
#3
def numbers():
    x = 2
    y = x+2
    return x, y

print(numbers())
x, y = numbers()
print(x, y)
Output:
(2, 4) 2 4
Reply


Messages In This Thread
Variables not returning - by dedesssse - Jul-29-2021, 06:22 PM
RE: Variables not returning - by ndc85430 - Jul-29-2021, 06:25 PM
RE: Variables not returning - by deanhystad - Jul-29-2021, 09:10 PM
RE: Variables not returning - by perfringo - Jul-30-2021, 06:59 AM

Forum Jump:

User Panel Messages

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