+ 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/)
20 Antworten
+ 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")
+ 1
also replace d/ with /d
+ 1
but that causes the output to be the same as the input.
+ 1
ok I see
+ 1
Do you have WhatsApp?
+ 1
No
+ 1
But I have email
+ 1
ok
+ 1
check out my code on my profile
+ 1
cadetcyuzuzo@camst.co.za??
+ 1
yes
+ 1
k
+ 1
thnx
+ 1
It's you who I have to thank
+ 1
no problem. if you need help with code just ask
+ 1
check your email
+ 1
I did
+ 1
Do you take it as a string and then make a new string using parts of the old one?
+ 1
generally yes
+ 1
what is this:
url.rfind
and what is .rfind?