Python. More elements than requested.
### try: DATA=list(func1()) corn=1 except: print("Step 3 skipped due to no integers") corn=0 if corn!=0: try: a, b=DATA print(a, b) pop=1 except: print("An integer is missing") pop=0 try: a=DATA print(a) ice=1 except: print("idk, but something is broken") ice=0 ### This is the last bit of code I had to cut down to fit on the forum. The idea is to request user input twice. The code detects if integers are used. If any integers are used, the info is returned to "def func1()". My issue is I'm getting too many elements in DATA than I requested. If I input one integer and one string, the end result should be a list with only one element (the integer). Instead, the list is created with as many elements as there are digits. Anyone have an idea as to how this is happening? I'm at a loss. Ill post code as public, as "slams_face_on_desk" if anyone is kind enough to offer some advice. https://code.sololearn.com/cTLzsEWQl6LF/#py @Diego tyvm. I believe I fixed the zero not being detected as an integer. But why return[one] or return[two]. Am curious, will try to figure it out. Thanks guys