Solutions for Can we shift string A to string B?

    • @kristeencoupp91
    • @Ethan, submitted in Python 2, achived 100% score
    import json,random,string
    def solve(target, string):
        return \
            target and string and \
            len(target) == len(string) and \
            string in target * 2
    • @kristeencoupp91
    • @Ethan, submitted in Python 2, achived 100% score
    import json,random,string
    def solve(target, string):
        return \
            target and string and \
            len(target) == len(string) and \
            string in target * 2
    • @kristeencoupp91
    • @Ethan, submitted in Python 3, achived 100% score
    import json,random,string
    def solve(target, string):
        return \
            target and string and \
            len(target) == len(string) and \
            string in target * 2