Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
variable gets lost
#11
More examples
def return_two():
    return 1, 2

two_results = return_two()
print(two_results)
Output:
(1, 2)
def return_two():
    return 1, 2

def return_three():
    return 1, 'two', return_two()

one, two, three = return_three()
print(one)
print(two)
print(three)
Output:
1 two (1, 2)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Lost Control over VLC jrockow 8 1,074 Jul-18-2023, 06:04 PM
Last Post: jrockow
  Lost Modules standenman 2 724 Jun-22-2023, 12:18 PM
Last Post: standenman
  Lost Module standenman 10 2,834 Oct-30-2021, 05:11 PM
Last Post: deanhystad
  XML Editing formatting lost ateestructural 2 1,904 Apr-08-2021, 04:41 AM
Last Post: ndc85430
  List structure lost when multiplying Protonn 2 2,235 Apr-23-2020, 04:16 AM
Last Post: buran
  lost dictionary jjpy 1 1,883 Jul-10-2019, 12:19 PM
Last Post: scidam

Forum Jump:

User Panel Messages

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