Click here to Skip to main content
15,889,813 members
Home / Discussions / Python
   

Python

 
AnswerRe: What is the difference between "C:\\my folder" and r"C:\my folder" in Python Pin
Richard Deeming12-Oct-23 21:45
mveRichard Deeming12-Oct-23 21:45 
GeneralRe: What is the difference between "C:\\my folder" and r"C:\my folder" in Python Pin
s yu13-Oct-23 3:17
s yu13-Oct-23 3:17 
AnswerRe: What is the difference between "C:\\my folder" and r"C:\my folder" in Python Pin
Alisha Aalu5-Nov-23 21:49
Alisha Aalu5-Nov-23 21:49 
SuggestionRe: What is the difference between "C:\\my folder" and r"C:\my folder" in Python Pin
Richard Deeming5-Nov-23 22:54
mveRichard Deeming5-Nov-23 22:54 
GeneralRe: What is the difference between "C:\\my folder" and r"C:\my folder" in Python Pin
Alisha Aalu7-Nov-23 21:51
Alisha Aalu7-Nov-23 21:51 
GeneralRe: What is the difference between "C:\\my folder" and r"C:\my folder" in Python Pin
Richard Deeming7-Nov-23 21:56
mveRichard Deeming7-Nov-23 21:56 
QuestionFLAMES game in python Pin
ganga devi 20237-Oct-23 20:20
ganga devi 20237-Oct-23 20:20 
AnswerRe: FLAMES game in python Pin
Richard MacCutchan7-Oct-23 21:38
mveRichard MacCutchan7-Oct-23 21:38 
The issue is with the loop at:
Python
while number > 1 :

    split_result = (number % len(result) -1)
    if split_result >= 0 :
        right = result[split_result + 1:]
        left = result[: split_result]
        result = right + left
    else:
        result = result[: len(result) - 1]

You never decrement the value of number so the loop will continue forever, or until some exception occurs. But it is not clear what the code inside the loop is supposed to do, so that also may need some reworking.

[edit]
Having looked again at this code I am not sure that the while statement above is correct. Try replacing it with if instead, thus:
Python
if number > 1:


[/edit]

modified 8-Oct-23 4:23am.

GeneralRe: FLAMES game in python Pin
ganga devi 20238-Oct-23 8:06
ganga devi 20238-Oct-23 8:06 
QuestionObjectDetectionCoral v1.5.1 - where is python.exe Pin
Richard N6-Oct-23 10:43
Richard N6-Oct-23 10:43 
AnswerRe: ObjectDetectionCoral v1.5.1 - where is python.exe Pin
Richard MacCutchan6-Oct-23 22:29
mveRichard MacCutchan6-Oct-23 22:29 
GeneralRe: ObjectDetectionCoral v1.5.1 - where is python.exe Pin
Richard N7-Oct-23 0:21
Richard N7-Oct-23 0:21 
GeneralRe: ObjectDetectionCoral v1.5.1 - where is python.exe Pin
Richard MacCutchan7-Oct-23 0:48
mveRichard MacCutchan7-Oct-23 0:48 
QuestionHOW TO register in Azure DevOps a CallBack, which triggers a Python function when a work items has been updated Pin
Member 140680196-Sep-23 9:32
Member 140680196-Sep-23 9:32 
AnswerRe: HOW TO register in Azure DevOps a CallBack, which triggers a Python function when a work items has been updated Pin
Richard MacCutchan6-Sep-23 21:57
mveRichard MacCutchan6-Sep-23 21:57 
GeneralRe: HOW TO register in Azure DevOps a CallBack, which triggers a Python function when a work items has been updated Pin
Member 140680197-Sep-23 13:44
Member 140680197-Sep-23 13:44 
GeneralRe: HOW TO register in Azure DevOps a CallBack, which triggers a Python function when a work items has been updated Pin
Richard MacCutchan7-Sep-23 23:23
mveRichard MacCutchan7-Sep-23 23:23 
QuestionPython Project Pin
African Electronic Literature2-Sep-23 21:15
African Electronic Literature2-Sep-23 21:15 
QuestionUpdating a Dictionary in python iteratively Pin
Maverick49426-Aug-23 12:39
Maverick49426-Aug-23 12:39 
AnswerRe: Updating a Dictionary in python iteratively Pin
Richard MacCutchan26-Aug-23 21:11
mveRichard MacCutchan26-Aug-23 21:11 
GeneralRe: Updating a Dictionary in python iteratively Pin
User 1604268027-Aug-23 6:27
User 1604268027-Aug-23 6:27 
GeneralRe: Updating a Dictionary in python iteratively Pin
Richard MacCutchan27-Aug-23 6:30
mveRichard MacCutchan27-Aug-23 6:30 
QuestionWhich technique to apply if function Y changes with values of X variables other than linear regression Pin
Member 106396367-Aug-23 12:42
Member 106396367-Aug-23 12:42 
AnswerRe: Which technique to apply if function Y changes with values of X variables other than linear regression Pin
Dave Kreskowiak7-Aug-23 12:57
mveDave Kreskowiak7-Aug-23 12:57 
GeneralRe: Which technique to apply if function Y changes with values of X variables other than linear regression Pin
Andre Oosthuizen7-Aug-23 23:18
mveAndre Oosthuizen7-Aug-23 23:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.