12 Antworten
+ 3
The string in print() must be exactly the same as in the task description in order to pass the test cases.
Also, some users have reported that playground is not working well these days and sometimes it won't give any output.
+ 1
Can you share here some examples of those logics with differences from SoloLearn and other sources?
+ 1
Hmmm okay ...
Now give me some samples to test that code with.
Better if you can also tell me what the problem is, cause I still don't see the logic diifference from SoloLearn's and other sources.
0
Like when i use the bult-in function find(). let me just show you my code .
0
# function to check if small string is
# there in big string
def search(string, sub_str):
if (string.find(sub_str) == -1):
print("not found")
else:
print("found!!")
# main code
string = input()
sub_str = input()
search(string, sub_str)
0
Okay, did you provide the inputs for <string> and <sub_str> in separate line? I had to ask cause many people got stuck on this, thinking input will be interactive.
https://code.sololearn.com/WhiNb9BkJUVC/?ref=app
0
yes sir
0
I tested your code and it works as expected (given some sample tests). I'm not sure what/why the module test isn't letting you pass ...
But just a little note, pay a close attention to the output. I've seen many people got stuck because their output differs to the one given in the task Description, even just by one letter.
0
Yeah but now i don't know what to do.
0
I think you're right, cause have tried all my best.
0
Syntax
if {substring} in {mainstring} == True:
Returns true if present.
- 1
the problem is that when i apply this simple code on my python module test, it's not giving results.
but on my Ide everything is perfect.