What's the difference with/without the "else"? [closed] - python

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 hours ago.
Improve this question
for char in range(len(pattern)):
if pattern[char] == text[char + index]:
else:
break
What is the difference with/without the else?

Related

How to take screenshot using d3dshot? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 days ago.
Improve this question
i just found d3dshot module for taking screenshot
but i can't find anything in google about it
i heard that it is very fast is it true?
d3dshot.CaptureOutputs
d3dshot.capture_output
d3dshot.capture_outputs
d3dshot.display
what should i do?

How do I add characters to strings? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 4 days ago.
Improve this question
Suppose a user wants to add a character or number to an existing string after randomly generating it, how do you add a character to a string?

Hangman Game (Issue with Png) [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 days ago.
Improve this question
why does it say my image a doesn't exist when it does, it says tkinter.tclerror:image a doesn't exit
I'm not sure what the issue.

Tkinter error(tkinter.TclError: bad geometry specifier "500*500) [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 months ago.
Improve this question
I got an error on st=Tk()
And the error is tkinter.TclError
it should be root.geometry("500x500")(root is the hypothetical window name)
but not root.geometry("500*500")

How to convert python RE module into ruby [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
How would I convert the following code into ruby requivalent?
reg = re.compile(r"([\[\_\-\—]+[ ]*[\d\]]+[ ]*[\_\-\—\]]+[ ])", re.IGNORECASE)
reg.sub(lambda m: r'\n{}'.format(m.group()), s)
I believe this is the answer?
s = s.gsub(/([\[\_\-\—]+[ ]*[\d\]]+[ ]*[\_\-\—\]]+[ ])/i,'\n\1')

Categories