I'm new to python programming, and as a beginner I want to start by using a code editor, I choose sublime text 4 but I face this problem, So help me please ! This is the code :
def return_string(your_string):
if len(your_string) >= 4:
new_string = your_string[0:2] + your_string[-2:]
return new_string
elif len(your_string) == 2:
new_string = your_string * 2
return new_string
elif len(your_string) < 2:
new_string = ""
return new_string
return_string("welcome")**
the expected output is "weme"
but I get nothing in sublime text output (when I click Ctrl + B).
When I change return
to print
the code is executed properly.
By the way the code above works in vscode without any problem.