Create a function that takes a string and an integer (`n`).

The function should return a string that repeats the input string `n` number of times.

If anything other than a string is passed in you should return `"Not a string"`


## Example

```
"Hi", 2 --> "HiHi"
1234, 5 --> "Not a string"
```

Difficulty: introductory

Starter code:

def repeat_it(string,n):
	

Solutions:
def repeat_it(string,n):
    return string * n if isinstance(string,str) else 'Not a string'

def repeat_it(string,n):
    if type(string) is not str:
        return 'Not a string'
    return string * n

repeat_it = lambda s, m: s*m if type(s) is str else "Not a string"

def repeat_it(s, n):
    return s * n if isinstance(s, str) else 'Not a string'

repeat_it = lambda s, m: s*m if isinstance(s, str) else "Not a string"

def repeat_it(string, n):
    return string*n if isinstance(string, type("")) else "Not a string"

def repeat_it(string,n):
    return n * string if isinstance(string, str) else "Not a string"

def repeat_it(string,n):
    if isinstance(string,str): 
        return n*string
    else:
        return "Not a string"

def repeat_it(string,n):
    if type(string) is str:
        return string*n
    return "Not a string"

def repeat_it(string,n):
    return string * n if type(string) == type('1') else 'Not a string'

def repeat_it(string: str, n: int) -> str:
    """ Get string that repeats the input string `n` number of time. """
    if type(string) is str:
        return string * n
    else:
        return "Not a string"

def repeat_it(string,n):
    return ''.join(string for i in range(n)) if type(string) == str else 'Not a string'

def repeat_it(string,n):
    print( string)
    if type(string) == str:
        return string * n
        print(string*n)
    else:
        return 'Not a string'

def repeat_it(string,n):
  print(type(string))
  return string*n if type(string) is str else 'Not a string'

def repeat_it(string,n):
    if type(string) is not str:
        return "Not a string"#bitch
    return string * n

def repeat_it(string,n):
    if (n == 0):
        return ''
    return string * n if type(string) == str else 'Not a string'

def repeat_it(string: str, n: int) -> str:
    return string * n if isinstance(string, str) else "Not a string"


repeat_it=lambda string,n: string*n if type(string)==str else "Not a string"

def repeat_it(string,n):
     return "Not a string" if type(string) != str else ''.join([string for i in range (1, n + 1)])

def repeat_it(string,n):
    return (string + repeat_it(string,n - 1) if n > 0 else "") if type(string) is str else "Not a string"

repeat_it = lambda string, n: string * n if string and type(string) == type('') else 'Not a string'

def repeat_it(string,n):
    return (''.join([string for x in range(n)]) if type(string) is str else 'Not a string')

def repeat_it(string,n):
    if not isinstance(string, str):
         return "Not a string"
    s = ""     
    for i in range(n):
      s += string
    return s


def repeat_it(string,n):
    try:
        if str(string) == string:
            return string * n
        else: return "Not a string"
    except ValueError:
        return string * n

def repeat_it(st,n):
    return st * n if type(st) == str else "Not a string"

def repeat_it(string,n):
    if string==[] or string=={}:
        return 'Not a string'
    if isinstance(string,int):
       return 'Not a string'
    print(string)
    return string*n 

def repeat_it(string,n):
    return string*n if type(string) == type('SSS') else "Not a string"

def repeat_it(string,n):
     if type(string)==str:
        return string*n
     elif type(string)!=str:
        return "Not a string"

def repeat_it(k,n):
    return k*n if isinstance(k ,str) else 'Not a string'

def repeat_it(string,n):
    if type(string) == str:
        res = string * n
    else:
        res = 'Not a string'
    return res

def repeat_it(string,n):
    return n * string if type(string) == type("a") else "Not a string"

def repeat_it(strng,n):
    if type(strng) != type(""):
        return "Not a string"
    return strng * n

def repeat_it(string,n):
    a = ""
    if isinstance(string, str):
        for i in range(0, n):
            a = a + string
    else:
        return "Not a string"
    return a

def repeat_it(string,n):
    if isinstance(string, str):
        a = ""
        for i in range (1, n + 1):
            a += string
        return a
    else:
        return "Not a string"

def repeat_it(a,n):
    if isinstance(a, str):
        return n*a
    else:
        return "Not a string"

def repeat_it(string,n):
    return string * n if str(n).isdigit() and isinstance(string, str) else "Not a string"

def repeat_it(strng, n):
    return strng*n if type(strng) == str else "Not a string"

def repeat_it(string,n):
    if type(string) != type('aring'):
        return 'Not a string'
    return n * string


def repeat_it(string,n):
    if not string or isinstance(string, int):
        return "Not a string"
    else: 
        return string * n

def repeat_it(string,n):
    return string*n if str(type(string)) == "<class 'str'>" else "Not a string"

def repeat_it(string,n):
    str = ''
    bool = False
    for i in range(n):
        try:
            str += string
        except: 
            bool = True
            return 'Not a string'
    if bool == False:
        return str

repeat_it=lambda s,n:s*n if type(s) is str else 'Not a string'

def repeat_it(string,n):
    if string == str(string):
        return str(string * n)
    else:
        return "Not a string"

def repeat_it(string,n):
    if not str(string) == string:
        return 'Not a string'
    return string * n

def repeat_it(string,n):
    if type(string) != str: return "Not a string" 
    return_string = []
    for i in range(n):
        return_string.append(string)
    return "".join(return_string)


repeat_it = lambda s, n: 'Not a string' if type(s) is not str else s * n

def repeat_it(string,n):
    return string*n if (string !=[] and type(string)==str) else 'Not a string'

def repeat_it(xs,n):
    if not isinstance(xs,str):
        return "Not a string"
    else:
        return xs * n

def repeat_it(string,n):
    print(string,n)
    if string == str(string):
        return string*n if string else 'Not a string'
    else:
        return 'Not a string'

def repeat_it(string,n):
    result = ""
    if type(string) != type('string'):
        return "Not a string"
    else:
        result += string * n
    return result

repeat_it=lambda s, n: 'Not a string' if type(s)!=str else s*n

def repeat_it(string,n):
    #your code here
    try:
        a = string.lower()
        return string*n
    except:
        return 'Not a string'

def repeat_it(string,n):
    if not isinstance(string, str): return "Not a string"
    result = ''
    for s in range(0, n): result += string
    return result

def repeat_it(s,n):
    return "Not a string" if s!=str(s) else s*n

def repeat_it(m,n):
    if m == str(m):
      return  m * n
    else:
        return "Not a string"

def repeat_it(s,n):
    return s*n if s == str(s) else 'Not a string'

def repeat_it(string,n):
    if n==0:    
        return ''
    for i in range(n):
        if isinstance(string, str)==True:
            return string*n
      
        else:    
            return "Not a string"


def repeat_it(string,n):
    return 'Not a string' if type(string)==int\
    or not string or string==False or string==True else n*string

def repeat_it(s,n):
    return n*s if type(s)==str else "Not a string"

def repeat_it(s,n):
    t = s
    if isinstance(s,str) and n != 0:
        for i in range(n-1):
            s += t
        return s
    if n == 0:
        return ''
    return 'Not a string'

def repeat_it(string,n):
    return string * n if string.__class__ == str else 'Not a string'

def repeat_it(sz, n):
    if type(sz) != str:
        return 'Not a string'
    else:
        return sz * n

def repeat_it(string,n):
    if type(string) != type(""):
         return "Not a string"
    else:
        return string*n

def repeat_it(string,n):
    if type(string)==int:
        return 'Not a string'
    elif not string:
        return 'Not a string'
    try:
        for char in string:
            if char=='2':
                return string*n
            elif char.isdigit():
                return 'Not a string'
        return string*n
    except:
        return 'Not a string'


def repeat_it(strng,n):
    return strng * n if type(strng) is str else 'Not a string'

def repeat_it(string,n):
    try:
        if type(string) == str: return string * n
        else: return "Not a string"
    except:
        return "Not a string"

def repeat_it(string,n):
    if type(string) == int or string == {} or string == [] or string == 1:
        return 'Not a string'
    else:
        return string * n

def repeat_it(string,n):
    if type(string) == str:
        newString = ""
        for i in range (n):
            newString += string
        
        return newString
    else:
        return "Not a string"

def repeat_it(string,n):
    if type(string) == str:
        return string*n
    else:
        return "Not a string"

print((repeat_it(1234, 2)))


def repeat_it(string,n):
    if not isinstance(string, str):
        return "Not a string"
    return ''.join(string for i in range(n))

def repeat_it(string,n):
    if isinstance(string, str):
        final = ""
        for i in range(n):
            final += string
        return final
    else:
        return "Not a string"


def repeat_it(string, n):
    print(string, n)
    return string * n if type(string) == str else "Not a string"

def repeat_it(string,n):
    try:
        string + " "
    except:
        return "Not a string"
    
    return string * n

def repeat_it(string, n):
#     print(string, n)
    if isinstance(string, str):
        return string * n
    else:
        return "Not a string"

def repeat_it(s,n):
    if type(s) == str:
        return s * n
    else:
        return "Not a string"

def repeat_it(string,n):
    if type(string) is not str : return "Not a string"
    result = ""
    for _ in range(0, n):    
        result += string
    return result

def repeat_it(string,n):
    #your code here
    return "Not a string" if type(string) is not str else string * n 
    
print(repeat_it("abc", 3))

def repeat_it(s,n):
    return s*n if type(s)==type(str(s)) else "Not a string"

def repeat_it(s, n):
    if isinstance(s, str) and s: return s * n
    else: return 'Not a string'

repeat_it = lambda x,y: x*y if type(x) == str else 'Not a string'

def repeat_it(string,n):
    str_ = ''
    
    if not isinstance(string, str):
        return "Not a string"
        
    for i in range(n):
        str_ = str_+string
    
    return str_

def repeat_it(s,n):
    if type(s)==str: return s*n
    return 'Not a string'

def repeat_it(string,n):
    #your code her
    return n*string if type(string)==type('=') else "Not a string"

def repeat_it(string: str,n: int) -> str:
    if not isinstance(string, str):
        return 'Not a string'
    return string * n

def repeat_it(a,b):
    if type(a)==str and type(b)==int:
        return(a*b)
    else:
        return("Not a string")

def repeat_it(string,n):
    return str(string*n if isinstance(string, str) else 'Not a string')

def repeat_it(string,n):
    if isinstance(string, int) or isinstance(string, float) or isinstance(string, dict) or isinstance(string, list):
        return "Not a string"
    return string * n

def repeat_it(string,n):
    if type(string) is str:
        return n * string
    else:
        return 'Not a string'

def repeat_it(s,n):
    if type(s) == str:
        x=1
        st=''
        while x<=n:
            st += s
            x += 1
        return st
    else:
        return "Not a string"
#Completed by Ammar on 25/8/2019 at 12:07AM.


def repeat_it(string,n):
    return string*n if isinstance(string,str) else 'Not a string' #I solved this Kata on  8/23/2019  01:11 AM...#Hussam'sCodingDiary

def repeat_it(string,n):
    tipus = type(string)
    print(("==>> ",string,n,tipus))
    if tipus == str:
        output = string * n
        return output
    else:
        return "Not a string"



def repeat_it(string,n):
    try:
        if string*n == str(string)*n:
            return string*n
        else:
            return "Not a string"
    except:
        return "Not a string"

def repeat_it(string,n):
    try:
        if len(string) > 0:
            return string * n
        else:
            return 'Not a string'
    except TypeError:
        return 'Not a string'

def repeat_it(string,n):
    if type(string) is not str:
        return "Not a string"
    text = ""
    for i in range(n):
        text += string
    return text

def repeat_it(string,n):
    if string.__class__()!='':
        return 'Not a string'
    return string*n

def repeat_it(string,n):
    if string != str(string):
        return "Not a string"
    return string*n

def repeat_it(string,n):
    return "Not a string" if not isinstance(string, str) else string + repeat_it(string,n-1) if n else ""