Please check why is it giving an error


#1

from itertools import permutations

def main():
# YOUR CODE GOES HERE
# Please take input and print output to standard input/output (stdin/stdout)
# E.g. ‘input()/raw_input()’ for input & ‘print’ for output
string = “one”
k = 2
if (k>len(string) or k<1):
print(“invalid input”)
else:
permut = list(permutations(string, k))
res = list(map(" ".join, permut))
for l in sorted(res):
print(l)
return 0

if name == ‘main’:
main()