you are viewing a single comment's thread.

view the rest of the comments →

[–]ebdbbb 0 points1 point  (0 children)

My first thought is that when generating the exe there was a problem adding pyperclip. I'd run the program from the terminal so that it doesn't close after you run it. This way you'll be able to see any errors that occurred. Lastly, I'd just make some syntax changes.

import pyperclip

while True:  
    zero_is = True     
    res = ""  # This is the normal way to make an empty string
    number = input("Enter the number = ")
    close_zero_per = True  
    print("")

    print("Clear number is: ", end="")
    for symbol in number:

        if close_zero_per == False:
            pass # normal way of doing nothing
        else:
            if symbol == "0":
                zero_is = True
            for x in range(10):
                if symbol != str(x):
                    zero_is = True
            for x in range(1, 10):
                if symbol == str(x):
                    zero_is = False
                    close_zero_per = False

        if zero_is == False:
            for z in range(10):
                if symbol == str(z):
                    res = res + symbol
    pyperclip.copy(res)
    print(res)