+ 1

One of my codes in python3 is terminating without the exit function being called? Can anyone tell me why?

My code is: dD1 =list(input('')) if True : while 'd/' in dD1 : del dD1[0] print("\n\n\n") My input is : (("https://drive.google.com/file/d/FILE_ID/edit?usp=sharing" )) as you can see I my input does not have more than one (d/)

21st Jul 2017, 2:47 PM
Vincent D'souza
Vincent D'souza - avatar
20 odpowiedzi
+ 1
If there are no more 'd/' in your list the while loop will stop and the code will terminate. Also indent your code correctly. like this: dD1 =list(input('')) if True : while 'd/' in dD1 : del dD1[0] print("\n\n\n")
21st Jul 2017, 3:42 PM
CADET CYUZUZO
CADET CYUZUZO - avatar
+ 1
also replace d/ with /d
21st Jul 2017, 4:10 PM
CADET CYUZUZO
CADET CYUZUZO - avatar
+ 1
but that causes the output to be the same as the input.
21st Jul 2017, 4:16 PM
Vincent D'souza
Vincent D'souza - avatar
+ 1
ok I see
21st Jul 2017, 4:17 PM
CADET CYUZUZO
CADET CYUZUZO - avatar
+ 1
Do you have WhatsApp?
21st Jul 2017, 4:17 PM
CADET CYUZUZO
CADET CYUZUZO - avatar
+ 1
No
21st Jul 2017, 4:18 PM
Vincent D'souza
Vincent D'souza - avatar
+ 1
But I have email
21st Jul 2017, 4:18 PM
Vincent D'souza
Vincent D'souza - avatar
+ 1
ok
21st Jul 2017, 4:19 PM
CADET CYUZUZO
CADET CYUZUZO - avatar
+ 1
check out my code on my profile
21st Jul 2017, 4:19 PM
CADET CYUZUZO
CADET CYUZUZO - avatar
+ 1
cadetcyuzuzo@camst.co.za??
21st Jul 2017, 4:20 PM
Vincent D'souza
Vincent D'souza - avatar
+ 1
yes
21st Jul 2017, 4:21 PM
CADET CYUZUZO
CADET CYUZUZO - avatar
+ 1
k
21st Jul 2017, 4:21 PM
Vincent D'souza
Vincent D'souza - avatar
+ 1
thnx
21st Jul 2017, 4:22 PM
CADET CYUZUZO
CADET CYUZUZO - avatar
+ 1
It's you who I have to thank
21st Jul 2017, 4:23 PM
Vincent D'souza
Vincent D'souza - avatar
+ 1
no problem. if you need help with code just ask
21st Jul 2017, 4:24 PM
CADET CYUZUZO
CADET CYUZUZO - avatar
+ 1
check your email
22nd Jul 2017, 2:37 PM
CADET CYUZUZO
CADET CYUZUZO - avatar
+ 1
I did
22nd Jul 2017, 2:40 PM
Vincent D'souza
Vincent D'souza - avatar
+ 1
Do you take it as a string and then make a new string using parts of the old one?
22nd Jul 2017, 2:41 PM
Vincent D'souza
Vincent D'souza - avatar
+ 1
generally yes
22nd Jul 2017, 2:55 PM
CADET CYUZUZO
CADET CYUZUZO - avatar
+ 1
what is this: url.rfind and what is .rfind?
23rd Jul 2017, 4:43 AM
Vincent D'souza
Vincent D'souza - avatar