title: Check String Can Obtained Rotating Another String 2 Places
signature: def check_string_can_obtained_rotating_another_string_2_places(str1, str2):
source_py: def check_string_can_obtained_rotating_another_string_2_places(str1, str2):
      if (len(str1) != len(str2)):
          return False
      clock_rot = ''
      anticlock_rot = ''
      l = len(str2)
      anticlock_rot = ((anticlock_rot + str2[(l - 2):]) + str2[0:(l - 2)])
      clock_rot = ((clock_rot + str2[2:]) + str2[0:2])
      return ((str1 == clock_rot) or (str1 == anticlock_rot))
source_cpp: bool check_string_can_obtained_rotating_another_string_2_places(string str1, string str2) {
    if ( str1 . length ( ) != str2 . length ( ) ) return false;
    string clock_rot = "";
    string anticlock_rot = "";
    int len = str2 . length ( );
    anticlock_rot = anticlock_rot + str2 . substr ( len - 2, 2 ) + str2 . substr ( 0, len - 2 );
    clock_rot = clock_rot + str2 . substr ( 2 ) + str2 . substr ( 0, 2 );
    return ( str1 . compare ( clock_rot ) == 0 || str1 . compare ( anticlock_rot ) == 0 );
  }
question_info.test_code: import array
  import bisect
  import collections
  import datetime
  import functools
  import heapq
  import itertools
  import math
  import queue
  import re
  import string
  import sys
  from typing import Any, Dict, List, Optional, Set
  
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  def validate_solution(actual, expected):
      return actual == expected
  
  def driver(str1, str2, expected):
      try:
          if validate_solution(PLACEHOLDER_FN_NAME(
              str1, str2),
              expected
          ):
              return "PASSED"
          return "FAILED"
      except Exception as exception_obj:
          return type(exception_obj).__name__
      
  if __name__ == "__main__":
      result = driver("amazon", "azonam", True)
      print(f"TEST-0...{result}")
  
      result = driver("onamaz", "amazon", True)
      print(f"TEST-1...{result}")
  
      result = driver("amazon", "azoman", False)
      print(f"TEST-2...{result}")
  
      result = driver("ab", "ab", True)
      print(f"TEST-3...{result}")
  
      result = driver("737009", "239119", False)
      print(f"TEST-4...{result}")
  
      result = driver("000110", "01111", False)
      print(f"TEST-5...{result}")
  
      result = driver("l", "YVo hqvnGxow", False)
      print(f"TEST-6...{result}")
  
      result = driver("4420318628", "52856", False)
      print(f"TEST-7...{result}")
  
      result = driver("11011111000000", "10", False)
      print(f"TEST-8...{result}")
  
      result = driver(" pvFHANc", "xBIDFbiGb", False)
      print(f"TEST-9...{result}")
  
      sys.exit(0)
question_info.test_case_ids: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
question_info.entry_fn_name: check_string_can_obtained_rotating_another_string_2_places
question_info.test_list: [{"idx": 0, "outputs": true, "inputs": {"str1": "amazon", "str2": "azonam"}}, {"idx": 1, "outputs": true, "inputs": {"str1": "onamaz", "str2": "amazon"}}, {"idx": 2, "outputs": false, "inputs": {"str1": "amazon", "str2": "azoman"}}, {"idx": 3, "outputs": true, "inputs": {"str1": "ab", "str2": "ab"}}, {"idx": 4, "outputs": false, "inputs": {"str1": "737009", "str2": "239119"}}, {"idx": 5, "outputs": false, "inputs": {"str1": "000110", "str2": "01111"}}, {"idx": 6, "outputs": false, "inputs": {"str1": "l", "str2": "YVo hqvnGxow"}}, {"idx": 7, "outputs": false, "inputs": {"str1": "4420318628", "str2": "52856"}}, {"idx": 8, "outputs": false, "inputs": {"str1": "11011111000000", "str2": "10"}}, {"idx": 9, "outputs": false, "inputs": {"str1": " pvFHANc", "str2": "xBIDFbiGb"}}]
question_info.entry_cls_name: Solution